Type Alias: AmnesiaErrorHandler
AmnesiaErrorHandler = (
error,context) =>void
Defined in: types.ts:256
Error reporter used by the provider when something goes wrong during
push / undo / redo.
Invocations are microtask-deferred: the handler runs after the
surrounding operation has finished and the pending set is empty, so a
handler is free to call push / undo / redo re-entrantly without
looping.
The default behavior is to log via console.error with the prefix
[Amnesia]. Pass a custom handler to forward to your error tracker.
When a command throws during undo() or redo(), the entry is left in
place so the application can retry or recover; this is reported as
phase: "undo" | "redo" with recoverable: true.
Parameters
| Parameter | Type |
|---|---|
error | unknown |
context | AmnesiaErrorContext |
Returns
void