Options
All
  • Public
  • Public/Protected
  • All
Menu

Represents an error that was caused by another error.

Hierarchy

  • Error
    • ErrorWithCause

Index

Constructors

constructor

Properties

Readonly cause

cause: Error

message

message: string

name

name: string

Optional stack

stack: string

Static Optional prepareStackTrace

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

Type declaration

    • (err: Error, stackTraces: CallSite[]): any
    • Optional override for formatting stack traces

      Parameters

      • err: Error
      • stackTraces: CallSite[]

      Returns any

Static stackTraceLimit

stackTraceLimit: number

Accessors

rootCause

  • get rootCause(): Error
  • Root cause of the error. If there are multiple errors caused one by another, the root cause is the first error that occurred. In case there is no root cause.

    Returns Error

Methods

Static captureStackTrace

  • captureStackTrace(targetObject: Object, constructorOpt?: Function): void
  • Create .stack property on a target object

    Parameters

    • targetObject: Object
    • Optional constructorOpt: Function

    Returns void