-
Notifications
You must be signed in to change notification settings - Fork 408
ZoneDelegate.hasTask (zone.js:418) ate my exception #706
Comments
@cenkentimist , could you explain more about it? what kind of information was eaten? |
a duplicate of this comment was added to the opening post after the stack trace:
desired behavior |
@cenkentimist, so you mean there is an exception thrown in ZoneDelegate.hasTask? |
@JiaLiPassion |
@cenkentimist , the code is here, ZoneDelegate.prototype.hasTask = function (targetZone, isEmpty) {
// hasTask should not throw error so other ZoneDelegate
// can still trigger hasTask callback
try {
return this._hasTaskZS &&
this._hasTaskZS.onHasTask(this._hasTaskDlgt, this._hasTaskCurrZone, targetZone, isEmpty);
}
catch (err) {
}
}; you mean that this._hasTaskZS.onHasTask throw error and you want to debug it? |
@JiaLiPassion Here are some things that would make me happy. zone.js could also throw the exception. |
@cenkentimist , yeah, I understand your requirement, but I don't understand is that why exception happen in that place. I know the exception is happened because the bad code, and you want to where the bad code is, what I mean is I don't think even the template error or other bad code, basically no exception should throw from that location. So I want to know the exact error of your case, thanks. |
@JiaLiPassion ok I'll try to come up with a minimal test case |
@JiaLiPassion Thanks for your patience here's a minimal case |
@cenkentimist , thanks , I can reproduce , I will debug it. |
git clone https://github.com/cenkentimist/AngularSupressedException.git open the developer console (view>developer>developertools) |
Something similar happened for me. More Info : angular/angular#15791 |
zone.js seems to have managed to eaten an exception that I needed. Don't know if this is actually zone.js's fault or something further down the stack is suppose to handle notifying of the exception but I figured you could probably tell me. Stack trace of exception follows
(anonymous) (display.component.ngfactory.ts:486)
debugUpdateRenderer (core.es5.js:12651)
checkAndUpdateView (core.es5.js:12030)
callViewAction (core.es5.js:12340)
execComponentViewsAction (core.es5.js:12286)
checkAndUpdateView (core.es5.js:12031)
callViewAction (core.es5.js:12340)
execEmbeddedViewsAction (core.es5.js:12312)
checkAndUpdateView (core.es5.js:12026)
callViewAction (core.es5.js:12340)
execEmbeddedViewsAction (core.es5.js:12312)
checkAndUpdateView (core.es5.js:12026)
callViewAction (core.es5.js:12340)
execComponentViewsAction (core.es5.js:12286)
checkAndUpdateView (core.es5.js:12031)
callViewAction (core.es5.js:12340)
execEmbeddedViewsAction (core.es5.js:12312)
checkAndUpdateView (core.es5.js:12026)
callViewAction (core.es5.js:12340)
execEmbeddedViewsAction (core.es5.js:12312)
checkAndUpdateView (core.es5.js:12026)
callViewAction (core.es5.js:12340)
execComponentViewsAction (core.es5.js:12286)
checkAndUpdateView (core.es5.js:12031)
callViewAction (core.es5.js:12340)
execEmbeddedViewsAction (core.es5.js:12312)
checkAndUpdateView (core.es5.js:12026)
callViewAction (core.es5.js:12340)
execComponentViewsAction (core.es5.js:12286)
checkAndUpdateView (core.es5.js:12031)
callWithDebugContext (core.es5.js:13013)
debugCheckAndUpdateView (core.es5.js:12553)
ViewRef_.detectChanges (core.es5.js:10122)
(anonymous) (core.es5.js:5052)
ApplicationRef_.tick (core.es5.js:5052)
(anonymous) (core.es5.js:4932)
ZoneDelegate.invoke (zone.js:365)
onInvoke (core.es5.js:4125)
ZoneDelegate.invoke (zone.js:364)
Zone.run (zone.js:125)
NgZone.run (core.es5.js:3994)
next (core.es5.js:4932)
schedulerFn (core.es5.js:3828)
SafeSubscriber.__tryOrUnsub (Subscriber.js:234)
SafeSubscriber.next (Subscriber.js:183)
Subscriber._next (Subscriber.js:125)
Subscriber.next (Subscriber.js:89)
Subject.next (Subject.js:55)
EventEmitter.emit (core.es5.js:3814)
NgZone.checkStable (core.es5.js:4090)
NgZone.setHasMicrotask (core.es5.js:4174)
onHasTask (core.es5.js:4137)
ZoneDelegate.hasTask (zone.js:418) //caught here
ZoneDelegate._updateTaskCount (zone.js:438)
Zone._updateTaskCount (zone.js:262)
Zone.runTask (zone.js:182)
drainMicroTaskQueue (zone.js:593)
ZoneTask.invoke (zone.js:464)
edit: (attempted) clarification
An exception's information is lost, specifically here's what happened.
result: angular template stops rendering and it's very difficult to debug, as no stack trace or other error information are logged to the console. The error is currently silently caught and discarded.
desired behavior
The exception is at some point shown to me either by being logged at some point, or being thrown and not caught at some point.
The text was updated successfully, but these errors were encountered: