Base error class used by MessageFormat

Hierarchy (View Summary)

Constructors

  • Parameters

    • type:
          | "empty-token"
          | "bad-escape"
          | "bad-input-expression"
          | "duplicate-attribute"
          | "duplicate-declaration"
          | "duplicate-option-name"
          | "duplicate-variant"
          | "extra-content"
          | "key-mismatch"
          | "parse-error"
          | "missing-fallback"
          | "missing-selector-annotation"
          | "missing-syntax"
          | "not-formattable"
          | "unknown-function"
          | "bad-function-result"
          | "bad-operand"
          | "bad-option"
          | "unresolved-variable"
          | "unsupported-operation"
          | "bad-selector"
          | "no-match"
    • message: string

    Returns MessageError

Properties

cause?: unknown
message: string
name: string
stack?: string
type:
    | "empty-token"
    | "bad-escape"
    | "bad-input-expression"
    | "duplicate-attribute"
    | "duplicate-declaration"
    | "duplicate-option-name"
    | "duplicate-variant"
    | "extra-content"
    | "key-mismatch"
    | "parse-error"
    | "missing-fallback"
    | "missing-selector-annotation"
    | "missing-syntax"
    | "not-formattable"
    | "unknown-function"
    | "bad-function-result"
    | "bad-operand"
    | "bad-option"
    | "unresolved-variable"
    | "unsupported-operation"
    | "bad-selector"
    | "no-match"
prepareStackTrace?: (err: Error, stackTraces: CallSite[]) => any

Optional override for formatting stack traces

stackTraceLimit: number

Methods

  • Create .stack property on a target object

    Parameters

    • targetObject: object
    • OptionalconstructorOpt: Function

    Returns void