Represents an error that was caused by another error.

Hierarchy

  • Error
    • ErrorWithCause

Constructors

  • Create an instance of ErrorWithCause.

    Parameters

    • message: string

      Error message.

    • cause: Error

      Original error, causing this error.

    Returns ErrorWithCause

Properties

cause: Error
message: string
name: string
stack?: string
prepareStackTrace?: (err: Error, stackTraces: CallSite[]) => any

Optional override for formatting stack traces

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
    • OptionalconstructorOpt: Function

    Returns void