Class FatalErrorAbstract

A fatal error represents an error shouldn't be rescued and that causes the execution to terminate. There shouldn't be code that catches fatal errors.

Hierarchy (View Summary)

Constructors

  • Creates a new FatalError error.

    Parameters

    • message:
          | string
          | TokenizedString
          | { command: string }
          | LinkToken
          | { char: string }
          | UserInputToken
          | { subdued: string }
          | { filePath: string }
          | ListToken
          | BoldToken
          | { info: string }
          | { warn: string }
          | { error: string }
          | Token[]

      The error message.

    • type: FatalErrorType

      The type of fatal error.

    • tryMessage:
          | null
          | string
          | TokenizedString
          | { command: string }
          | LinkToken
          | { char: string }
          | UserInputToken
          | { subdued: string }
          | { filePath: string }
          | ListToken
          | BoldToken
          | { info: string }
          | { warn: string }
          | { error: string }
          | Token[] = null

      The message that recommends next steps to the user. You can pass a string a TokenizedString or a TokenItem if you need to style the message inside the error Banner component.

    • OptionalnextSteps: TokenItem<InlineToken>[]

      Message to show as "next steps" with suggestions to solve the issue.

    • OptionalcustomSections: CustomSection[]

      Custom sections to show in the error banner. To be used if nextSteps is not enough.

    Returns FatalError

Properties

customSections?: CustomSection[]
formattedMessage?: TokenItem
nextSteps?: TokenItem<InlineToken>[]
skipOclifErrorHandling: boolean
tryMessage: null | TokenItem