Hierarchy

Constructors

  • Parameters

    • Optional message: string

    Returns CW.Error

  • Parameters

    • Optional message: string
    • Optional options: ErrorOptions

    Returns CW.Error

Properties

cause?: unknown
message: string
name: string
stack?: string
prepareStackTrace?: ((err, stackTraces) => 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) => 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
        • 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