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 full)

Constructors

  • Creates a new FatalError error.

    Parameters

    • message: string | TokenizedString | CommandToken | LinkToken | CharToken | UserInputToken | SubduedToken | FilePathToken | ListToken | BoldToken | InfoToken | WarnToken | ErrorToken | Token[]

      The error message.

    • type: FatalErrorType

      The type of fatal error.

    • tryMessage: null | string | TokenizedString | CommandToken | LinkToken | CharToken | UserInputToken | SubduedToken | FilePathToken | ListToken | BoldToken | InfoToken | WarnToken | ErrorToken | 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.

    • Optional nextSteps: TokenItem<InlineToken>[]

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

    • Optional customSections: 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