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.
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new ErrorListeners(
filePath,options?):ErrorListeners
Defined in: packages/app-system/src/process/error-listeners.ts:62
Creates a new instance of LoggerErrorListeners.
Parameters
Section titled “Parameters”filePath
Section titled “filePath”string
The path to the file where errors will be logged.
options?
Section titled “options?”The options for the LoggerErrorListeners.
Returns
Section titled “Returns”ErrorListeners
Methods
Section titled “Methods”attach()
Section titled “attach()”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.
Returns
Section titled “Returns”void
detach()
Section titled “detach()”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.
Returns
Section titled “Returns”void
isAttached()
Section titled “isAttached()”isAttached():
boolean
Defined in: packages/app-system/src/process/error-listeners.ts:74
Checks if the listeners are currently attached.
Returns
Section titled “Returns”boolean
True if the listeners are currently attached, false otherwise.