[]previous and next page

Errors nobody handles

Errors nobody handles in the Error handling guide.

For agentsUpdated

If no handler takes an error:

  • During a flush (an effect threw), the engine keeps running the remaining effects, then throws once the queues are empty. One error is thrown as it is; several are thrown together as an AggregateError with an errors array. The caller of flushSync() or batch() sees the throw.
  • During the flush that runs in a microtask (a plain signal write outside an event handler), there is no caller. The error is passed to the global reportError function, which browsers surface as a window error event.
  • Outside a flush and outside disposal, the error is thrown at the call site.
  • Errors from several cleanups during one disposal are thrown together after all of them ran.