Skip to content

1681-engine / index / captureErrors

Function: captureErrors() ​

ts
function captureErrors(onError, options?): () => void;

Defined in: src/diagnostics/captureErrors.ts:27

Hands every error nothing else caught — error and unhandledrejection on the window, and what a frame caught — to onError, each distinct one once. The engine sends nothing itself; reporting it is the game's. Returns the uninstall, which puts back whatever held Stage.onCaught before.

Parameters ​

ParameterType
onError(e) => void
optionsCaptureErrorsOptions

Returns ​

() => void

Released under the MIT License.