Represents an error object with a key, description, timestamp, and stack trace. Implements the AbstractErrorObject and Params interfaces.

Implements

Implements

Implements

  • AbstractErrorObject
  • Params

Constructors

  • Creates an instance of ErrorObject.

    Parameters

    • key: string

      A unique identifier for the error.

    • Optional description: string

      An optional description of the error.

    Returns ErrorObject

Properties

description: undefined | string
isErrorObject: boolean = true
key: string
stackTrace: undefined | string
timestamp: Date

Methods

  • Retrieves the current stack trace as a string.

    This method uses the StackTrace.get() function to obtain an array of stack frames, converts each stack frame to a string, and joins them with newline characters.

    Returns Promise<string>

    A promise that resolves to the stringified stack trace.

  • Parameters

    • json: string

    Returns void