Class UcError

Charge error.

Represents an error info wrapped into Error.

Hierarchy

  • Error
    • UcError

Implements

Constructors

Properties

prepareStackTrace?: ((err, stackTraces) => any)

Type declaration

stackTraceLimit: number
cause?: unknown

Error cause. E.g. an exception thrown.

message: string

Default error message in English.

Default Value

'Unexpected error'

name: string
stack?: string

Accessors

Methods

  • Create .stack property on a target object

    Parameters

    • targetObject: object
    • Optional constructorOpt: Function
      Optional

    Returns void

  • Creates URI charge error caused by the given cause.

    • If the given cause is UcError already, then just returns it.
    • If the given cause is an error info, then wraps it into error.
    • If the given cause is a string, then uses it as error message, with error code.
    • If the given cause is an Error, the uses its message as error message, and Error instance as error cause with error cause.
    • Otherwise, uses the cause as error cause with error code and default error message.

    Parameters

    • cause: unknown

      Cause of error.

    Returns UcError

    Error instance.

Generated using TypeDoc