Hierarchy

Constructors

  • Parameters

    • Optional message: string

    Returns Scrt.Error

Properties

message: string
name: string
stack?: string
Failed: typeof FadromaError_Failed

Thrown when an operation fails.

Invalid: typeof FadromaError_Invalid

Thrown when an invalid value or operation is at hand.

Missing: typeof FadromaError_Missing

Thrown when a required parameter is missing.

Unimplemented: typeof OopsError = ...

Thrown when the control flow reaches unimplemented areas.

Unsupported: typeof FadromaError_Unsupported

Thrown when unsupported functionality is requested.

prepareStackTrace?: ((err: Error, stackTraces: CallSite[]) => any)

Type declaration

stackTraceLimit: number

Methods

  • Create .stack property on a target object

    Parameters

    • targetObject: object
    • Optional constructorOpt: Function

    Returns void

  • Define an error subclass.

    Type Parameters

    • T extends unknown[]

    Parameters

    • name: string

      Name of error class. Prepended to parent.

    • getMessage: string | ((...args: T) => string) = ...

      How to generate the error message from the arguments passed to the constructor.

    • Optional construct: ((self: Error, ...args: T) => any)

      Whether there are any further construction steps such as assigning properties.

        • (self: Error, ...args: T): any
        • Whether there are any further construction steps such as assigning properties.

          Parameters

          • self: Error
          • Rest ...args: T

          Returns any

    Returns typeof OopsError

Generated using TypeDoc