Class ExitHandlers

Hierarchy

  • ExitHandlers

Constructors

Properties

_errFormat: "json" | "error"
_exiting: boolean = false
handlers: ((signal?) => Promise<void>)[]

Mutate this array to control handlers Handlers will be executed in reverse order

Type declaration

    • (signal?): Promise<void>
    • Parameters

      • Optional signal: Signals

      Returns Promise<void>

Accessors

Methods

  • Execute handlers in reverse-order to match matroska model

    Parameters

    • Optional signal: Signals

    Returns Promise<void>

  • Handles termination signals This is idempotent After executing handlers, it will re-signal the process group This effectively runs the default signal handler in the NodeJS VM

    Parameters

    • signal: Signals

    Returns Promise<void>

  • Handles synchronous exceptions This prints out appropriate error message on STDERR It sets the exit code to SOFTWARE

    Parameters

    • e: Error

    Returns Promise<void>

  • Handles asynchronous exceptions This prints out appropriate error message on STDERR It sets the exit code to SOFTWARE

    Parameters

    • e: Error

    Returns Promise<void>

Generated using TypeDoc