Represents an error that was caused by another error.

Hierarchy

  • Error
    • ErrorWithCause

Constructors

Properties

cause: Error

Original error, causing this error.

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

Optional override for formatting stack traces

Type declaration

    • (err, stackTraces): any
    • Parameters

      • err: Error
      • stackTraces: CallSite[]

      Returns any

stackTraceLimit: number

Accessors

  • 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

    The root cause.

Methods

  • Create .stack property on a target object

    Copyright Ⓒ 2024 SAP SE or an SAP affiliate company. All rights reserved.

    Parameters

    • targetObject: object
    • Optional constructorOpt: Function

    Returns void