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 was archived by the owner on Apr 12, 2024. It is now read-only.
$q.resolve().then(function(){thrownewError();}).catch(function(e){// ok, but the catch-all handler also receives `e` (incorrect)});
Correctly handled when:
$q.resolve().then(function(){try{thrownewError();}catch(e){return$q.reject(e);}}).catch(function(e){// ok, and the catch-all handler has not been activated (correct)});
line 365: the Error is correctly passed up the promise chain: deferred.reject(e);
line 366: the Error is also passed to the exceptionHandler(e);, which effectively forks the control flow, if the Promise chain in 1. was not ignored.
Normally this is not a ciritical issue, since exceptionHandler() is usually used to just print errors to the console, however correctly the error would make it to the exceptionHandler() only if it was not ignored by the deferred.reject(e); chain (which, I'm not sure if it's even feasible to implement).