Skip to content

ErrorListeners

Defined in: packages/app-system/src/process/error-listeners.ts:52

A utility class that listens for unhandled promise rejections and uncaught exceptions, logs them to a specified file, or if that fails, to stderr.

new ErrorListeners(filePath, options?): ErrorListeners

Defined in: packages/app-system/src/process/error-listeners.ts:62

Creates a new instance of LoggerErrorListeners.

string

The path to the file where errors will be logged.

ErrorListenersOptions

The options for the LoggerErrorListeners.

ErrorListeners

attach(): void

Defined in: packages/app-system/src/process/error-listeners.ts:84

Attaches the listeners for unhandled promise rejections and uncaught exceptions.

If the listeners are already attached, this method does nothing.

void


detach(): void

Defined in: packages/app-system/src/process/error-listeners.ts:107

Detaches the listeners for unhandled promise rejections and uncaught exceptions.

If the listeners are not attached, this method does nothing.

void


isAttached(): boolean

Defined in: packages/app-system/src/process/error-listeners.ts:74

Checks if the listeners are currently attached.

boolean

True if the listeners are currently attached, false otherwise.