Class DDNetError

Wrapper class for the Error built-in class, used as a catch all option and to also provide error context.

Hierarchy

  • Error
    • DDNetError

Constructors

  • Create a new instance of DDNetError

    Parameters

    • Optionalreason: string

      The reason for this error.

    • Optionalcontext: unknown

      Context for this error, usually an Error object, array or a string, ultimately unknown type.

    Returns DDNetError

Properties

cause?: unknown
context?: unknown

Context for this error, usually an Error object, array or a string, ultimately unknown type.

message: string
name: string
stack?: string
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