Class WorkDoneError<TWork>

An error indicating the work is already done.

Type Parameters

  • TWork = unknown

Hierarchy

  • TypeError
    • WorkDoneError

Constructors

  • Constructs a work done error.

    Type Parameters

    • TWork = unknown

    Parameters

    • workload: Workload<TWork>

      A workload the work is done for.

    • work: undefined | TWork

      The work already done, if any.

    • reason: unknown

      The reason of work failure, or undefined if the work completed successfully.

    • message: string = ...

      Custom error message.

    Returns WorkDoneError<TWork>

Properties

message: string
name: string
reason: unknown

The reason of work failure, or undefined if the work completed successfully.

stack?: string
work: undefined | TWork

The work already done, if any.

workload: Workload<TWork>

A workload the work is done for.

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

Type declaration

stackTraceLimit: number

Methods

  • Create .stack property on a target object

    Parameters

    • targetObject: object
    • Optional constructorOpt: Function

    Returns void

Generated using TypeDoc