You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 26, 2024. It is now read-only.
It would be helpful to be able to check in angular's error handler what the original error is. In order to safely check what the original error is, it would be helpful to have compiler checking on UncaughtPromiseError. Something like:
import{UncaughtPromiseError}from'@angular/zone';import{ErrorHandler}from'@angular/core';exportclassMyErrorHandlerimplementsErrorHandler{handleError(error: Error|UncaughtPromiseError){if(error.rejection){// do something with the original error}}}
Zone is not exposed as an angular npm module, so that might also be a requirement.
Right now the only way to accomplish this is to duplicate the UncaughtPromiseError interface, which is error prone.
Thanks.
The text was updated successfully, but these errors were encountered:
trshafer
changed the title
expose ZoneAwareError and UncaughtPromiseError
Expose ZoneAwareError and UncaughtPromiseError
Jan 19, 2018
UncaughtPromiseError provides the original error which is thrown on the
rejection
property:zone.js/lib/common/promise.ts
Line 192 in fd91152
It would be helpful to be able to check in angular's error handler what the original error is. In order to safely check what the original error is, it would be helpful to have compiler checking on UncaughtPromiseError. Something like:
Zone is not exposed as an angular npm module, so that might also be a requirement.
Right now the only way to accomplish this is to duplicate the UncaughtPromiseError interface, which is error prone.
Thanks.
The text was updated successfully, but these errors were encountered: