FailedState.ts 430 B

123456789101112
  1. import { LaunchContext, LaunchState, LaunchStateId } from './LaunchState';
  2. export class FailedState implements LaunchState {
  3. readonly id = LaunchStateId.Failed;
  4. async enter(context: LaunchContext): Promise<null> {
  5. console.error('[LaunchStateMachine] bootstrap failed', context.error);
  6. const i18n = context.kernel.i18n;
  7. context.progress({ state: this.id, title: i18n.t('launch.failed') });
  8. return null;
  9. }
  10. }