Errors nobody handles
Errors nobody handles in the Error handling guide.
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
AggregateErrorwith anerrorsarray. The caller offlushSync()orbatch()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
reportErrorfunction, which browsers surface as awindowerrorevent. - 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.