error_reporting/web_error_handlers_stub
library
Functions
-
installEarlyWebErrorHandlers()
→ void
-
No-op on non-web targets. (On web this installs the apply-once
window.addEventListener('error' | 'unhandledrejection') handlers.)
-
simulateWebError(Object error, StackTrace? stack)
→ void
-
Test-only seam (ERH-009): routes a synthesized
(error, stack) through the
chokepoint exactly as a real web-JS handler would, BYPASSING window, so a
VM unit test (which resolves this stub via the conditional import) can cover
the routing without a browser. The web library's copy does the same against a
real WebJsError. (Because it bypasses window, it cannot catch a defect in
the real window→WebJsError serialization — that needs an E2E smoke.)