Hierarchy (view full)

Constructors

  • Parameters

    • Optional message: string

    Returns Error

  • Parameters

    • Optional message: string
    • Optional options: ErrorOptions

    Returns Error

Properties

cause?: unknown
message: string
name: string
stack?: string
prepareStackTrace?: ((err, stackTraces) => any)

Optional override for formatting stack traces

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) => string) = ...

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

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

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

        • (self, ...args): any
        • Parameters

          Returns any

    Returns typeof OopsError

Generated using TypeDoc