Skip to content
This repository was archived by the owner on Feb 26, 2024. It is now read-only.

Registering an error handler on the root zone #422

Closed
owenkrafft opened this issue Sep 1, 2016 · 0 comments
Closed

Registering an error handler on the root zone #422

owenkrafft opened this issue Sep 1, 2016 · 0 comments

Comments

@owenkrafft
Copy link

I want to collect uncaught exceptions throughout my code in an error handler to use for reporting purposes, but exceptions in Promises don't fire window.onerror. An error handler on the root Zone seems to work quite well, but it seems that the only non-ugly way to register an error handler is during Zone construction by passing in a ZoneSpec with an onHandleError function, and the root Zone is constructed automatically.

Is there a recommended way to do this or another approach I can use?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants