Skip to main content

Module uncaught

Module uncaught 

Source

Functions§

begin_capture
Begin capturing default reports (tests). While active, reports append to the capture buffer instead of writing to stderr.
flush_pending_rejections
Dispatch every recorded unhandled rejection. Called at the tail of job_queue::run_jobs (all drains funnel there). Snapshot-and-drain: a handler that rejects further promises records new entries which flush on the next round — no unbounded recursion. Entries cancelled by a late .catch (tracker Handled) lose their GcStore root before the flush and are skipped via the None lookup.
install
Install the router on the current thread’s runtime:
route_uncaught_exception
Route a synchronous-callback exception (timer fire, job failure, emitter listener throw). reason is the captured pending-exception value.
route_unhandled_rejection
Route an unhandled promise rejection: unhandledRejection handlers first; without one, escalate as an uncaught exception (Node default throw mode).
take_capture
End capturing and return everything reported since begin_capture.