handleCrash
handleCrash(
error,origin,exit?,getContext?):void
Defined in: _worktrees/docs-release/gaunt-sloth/packages/core/src/utils/crashHandler.ts:123
The crash-handling body. Exported (rather than only closed over by the listeners) so it can be
unit-tested directly with an injected exit and getContext, without registering real process
listeners or killing the test runner.
Parameters
Section titled “Parameters”unknown
the thrown value / rejection reason
origin
Section titled “origin”string
'uncaughtException' | 'unhandledRejection'
(code) => void
terminator (default process.exit); injectable so tests capture the code
getContext?
Section titled “getContext?”() => CrashContext
source of the snapshot context (default the module context)
Returns
Section titled “Returns”void