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 ​
| Parameter | Type |
|---|---|
onError | (e) => void |
options | CaptureErrorsOptions |
Returns ​
() => void