<p dir="auto"><strong>I'm submitting a ...</strong>  (check one with "x")</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[x] bug report =&gt; search github for a similar issue or PR before submitting
[ ] feature request
[ ] support request =&gt; Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question"><pre class="notranslate"><code class="notranslate">[x] bug report =&gt; search github for a similar issue or PR before submitting
[ ] feature request
[ ] support request =&gt; Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question
</code></pre></div>
<p dir="auto"><strong>Current behavior</strong><br>
When processing data I ran into error originating from accessing a variable with undefined as its value. However this error does not make it to the console. The rendering of the view stops and nothing happens. There is nothing on the console.<br>
Debugging the issue with the Developer Tools in chrome I could see that the error is thrown and it goes to core.es5.js in @angular/core/@angular/core.es5.js =&gt; callWithDebugContext() @ Line number 13054.<br>
Whenever the errors are not propagating to the console I can debug that the state of the view is 2 in the variable _currentView.</p>
<p dir="auto">Note:<br>
The project was initially created from the Angular Seed Project which was running Angular 2.4.x. Recently I ported the entire application to Angular CLI 1.0.0 running Angular 4.0.0. Earlier the same issue happened where there was no issue in the console but the page was not loading (in Angular 4 / Angular-CLI 1). When investigating it was some old code present in the previous version running on Angular 2.4.x that was causing the issue and I found this out when trying to run the application on the previous versions and that caused errors on the console which I fixed in the new version (Running Angular 4)</p>
<p dir="auto"><strong>Expected behavior</strong><br>
For any such TypeErrors the message has to propagate to the console ( when no user written catch block is specified ).</p>
<p dir="auto"><strong>Minimal reproduction of the problem with instructions</strong><br>
I am finding it hard to reproduce in a new project since my current project is fairly large.<br>
<a href="https://plnkr.co/edit/SbExopvcG02v74Ess5FM?p=catalogue" rel="nofollow">https://plnkr.co/edit/SbExopvcG02v74Ess5FM?p=catalogue</a></p>
<p dir="auto"><strong>What is the motivation / use case for changing the behavior?</strong></p>

<p dir="auto"><strong>Please tell us about your environment:</strong></p>

<p dir="auto">Windows 7 OS 64Bit.<br>
Visual Studio Code 1.1.0.2<br>
Node Package Manager 3.10.8<br>
Using ng serve</p>
<ul dir="auto">
<li><strong>Angular version:</strong> 2.0.X</li>
</ul>

<p dir="auto">+-- @angular/animations@4.0.1<br>
+-- @angular/cli@1.0.0<br>
+-- @angular/common@4.0.0<br>
+-- @angular/compiler@4.0.0<br>
+-- @angular/compiler-cli@4.0.0<br>
+-- @angular/core@4.0.0<br>
+-- @angular/forms@4.0.0<br>
+-- @angular/http@4.0.0<br>
+-- @angular/platform-browser@4.0.0<br>
+-- @angular/platform-browser-dynamic@4.0.0<br>
+-- @angular/router@4.0.0<br>
+-- @types/jasmine@2.5.38<br>
+-- @types/node@6.0.60<br>
+-- angular2-jwt@0.2.0<br>
+-- bootstrap@3.3.7<br>
+-- codelyzer@2.0.0<br>
+-- core-js@2.4.1<br>
+-- font-awesome@4.7.0<br>
+-- grunt@1.0.1<br>
+-- grunt-exec@2.0.0<br>
+-- jasmine-core@2.5.2<br>
+-- jasmine-spec-reporter@3.2.0<br>
+-- jquery@3.2.1<br>
+-- karma@1.4.1<br>
+-- karma-chrome-launcher@2.0.0<br>
+-- karma-cli@1.0.1<br>
+-- karma-coverage-istanbul-reporter@0.2.0<br>
+-- karma-jasmine@1.1.0<br>
+-- karma-jasmine-html-reporter@0.2.2<br>
+-- ng2-toastr@4.0.1<br>
+-- protractor@5.1.0<br>
+-- rxjs@5.1.0<br>
+-- ts-node@2.0.0<br>
+-- tslint@4.5.0<br>
+-- typescript@2.2.0<br>
`-- zone.js@0.8.4</p>
<ul dir="auto">
<li><strong>Browser:</strong> [all | Chrome XX | Firefox XX | IE XX | Safari XX | Mobile Chrome XX | Android X.X Web Browser | iOS XX Safari | iOS XX UIWebView | iOS XX WKWebView ]</li>
</ul>

<p dir="auto">Chrome 56.0.2924.87</p>
<ul dir="auto">
<li>
<p dir="auto"><strong>Language:</strong> [all | TypeScript X.X | ES6/7 | ES5]<br>
TypeScript 2.2.1</p>
</li>
<li>
<p dir="auto"><strong>Node (for AoT issues):</strong> <code class="notranslate">node --version</code> =<br>
v6.9.1</p>
</li>
</ul>
<p dir="auto">I do not know what all I need to debug this and will be glad to provide more information ( once the kind of information required is specified ).</p>
<p dir="auto">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</p>
<p dir="auto">(anonymous) (display.component.ngfactory.ts:486)<br>
debugUpdateRenderer (core.es5.js:12651)<br>
checkAndUpdateView (core.es5.js:12030)<br>
callViewAction (core.es5.js:12340)<br>
execComponentViewsAction (core.es5.js:12286)<br>
checkAndUpdateView (core.es5.js:12031)<br>
callViewAction (core.es5.js:12340)<br>
execEmbeddedViewsAction (core.es5.js:12312)<br>
checkAndUpdateView (core.es5.js:12026)<br>
callViewAction (core.es5.js:12340)<br>
execEmbeddedViewsAction (core.es5.js:12312)<br>
checkAndUpdateView (core.es5.js:12026)<br>
callViewAction (core.es5.js:12340)<br>
execComponentViewsAction (core.es5.js:12286)<br>
checkAndUpdateView (core.es5.js:12031)<br>
callViewAction (core.es5.js:12340)<br>
execEmbeddedViewsAction (core.es5.js:12312)<br>
checkAndUpdateView (core.es5.js:12026)<br>
callViewAction (core.es5.js:12340)<br>
execEmbeddedViewsAction (core.es5.js:12312)<br>
checkAndUpdateView (core.es5.js:12026)<br>
callViewAction (core.es5.js:12340)<br>
execComponentViewsAction (core.es5.js:12286)<br>
checkAndUpdateView (core.es5.js:12031)<br>
callViewAction (core.es5.js:12340)<br>
execEmbeddedViewsAction (core.es5.js:12312)<br>
checkAndUpdateView (core.es5.js:12026)<br>
callViewAction (core.es5.js:12340)<br>
execComponentViewsAction (core.es5.js:12286)<br>
checkAndUpdateView (core.es5.js:12031)<br>
callWithDebugContext (core.es5.js:13013)<br>
debugCheckAndUpdateView (core.es5.js:12553)<br>
ViewRef_.detectChanges (core.es5.js:10122)<br>
(anonymous) (core.es5.js:5052)<br>
ApplicationRef_.tick (core.es5.js:5052)<br>
(anonymous) (core.es5.js:4932)<br>
ZoneDelegate.invoke (zone.js:365)<br>
onInvoke (core.es5.js:4125)<br>
ZoneDelegate.invoke (zone.js:364)<br>
Zone.run (zone.js:125)<br>
NgZone.run (core.es5.js:3994)<br>
next (core.es5.js:4932)<br>
schedulerFn (core.es5.js:3828)<br>
SafeSubscriber.__tryOrUnsub (Subscriber.js:234)<br>
SafeSubscriber.next (Subscriber.js:183)<br>
Subscriber._next (Subscriber.js:125)<br>
Subscriber.next (Subscriber.js:89)<br>
Subject.next (Subject.js:55)<br>
EventEmitter.emit (core.es5.js:3814)<br>
NgZone.checkStable (core.es5.js:4090)<br>
NgZone.setHasMicrotask (core.es5.js:4174)<br>
onHasTask (core.es5.js:4137)<br>
ZoneDelegate.hasTask (zone.js:418) //caught here<br>
ZoneDelegate._updateTaskCount (zone.js:438)<br>
Zone._updateTaskCount (zone.js:262)<br>
Zone.runTask (zone.js:182)<br>
drainMicroTaskQueue (zone.js:593)<br>
ZoneTask.invoke (zone.js:464)</p>
<p dir="auto">edit: (attempted) clarification<br>
An exception's information is lost, specifically here's what happened.</p>
<ol dir="auto">
<li>an angular template references invalid_variable.foo</li>
<li>this throws an error ReferenceError: invalid_variable is not defined or possibly Cannot read property 'foo' of undefined (the exact error isn't important)</li>
<li>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.</li>
<li>ZoneDelegate.hasTask (zone.js:418) is wraped in a try catch where the catch does nothing. This catches the exception and stops handling it<br>
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.</li>
</ol>
<p dir="auto">desired behavior<br>
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.</p>