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

ZoneDelegate.hasTask (zone.js:418) ate my exception #706

@cenkentimist

Description

@cenkentimist

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.

  1. an angular template references invalid_variable.foo
  2. this throws an error ReferenceError: invalid_variable is not defined or possibly Cannot read property 'foo' of undefined (the exact error isn't important)
  3. the exception propagates up the stack (it's an exception after all) At several points it's caught enhanced with more information and thrown again, no surprises there.
  4. ZoneDelegate.hasTask (zone.js:418) is wraped in a try catch where the catch does nothing. This catches the exception and stops handling it
    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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions