Issue 1:
I'm submitting a ... (check one with "x")

[x] bug report => search github for a similar issue or PR before submitting
[ ] feature request
[ ] support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question

Current behavior

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.

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 => callWithDebugContext() @ Line number 13054.

Whenever the errors are not propagating to the console I can debug that the state of the view is 2 in the variable _currentView.

Note:

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)

Expected behavior

For any such TypeErrors the message has to propagate to the console ( when no user written catch block is specified ).

Minimal reproduction of the problem with instructions

I am finding it hard to reproduce in a new project since my current project is fairly large.

https://plnkr.co/edit/SbExopvcG02v74Ess5FM?p=catalogue

What is the motivation / use case for changing the behavior?

Please tell us about your environment:

Windows 7 OS 64Bit.

Visual Studio Code 1.1.0.2

Node Package Manager 3.10.8

Using ng serve

Angular version: 2.0.X

+-- @angular/animations@4.0.1

+-- @angular/cli@1.0.0

+-- @angular/common@4.0.0

+-- @angular/compiler@4.0.0

+-- @angular/compiler-cli@4.0.0

+-- @angular/core@4.0.0

+-- @angular/forms@4.0.0

+-- @angular/http@4.0.0

+-- @angular/platform-browser@4.0.0

+-- @angular/platform-browser-dynamic@4.0.0

+-- @angular/router@4.0.0

+-- @types/jasmine@2.5.38

+-- @types/node@6.0.60

+-- angular2-jwt@0.2.0

+-- bootstrap@3.3.7

+-- codelyzer@2.0.0

+-- core-js@2.4.1

+-- font-awesome@4.7.0

+-- grunt@1.0.1

+-- grunt-exec@2.0.0

+-- jasmine-core@2.5.2

+-- jasmine-spec-reporter@3.2.0

+-- jquery@3.2.1

+-- karma@1.4.1

+-- karma-chrome-launcher@2.0.0

+-- karma-cli@1.0.1

+-- karma-coverage-istanbul-reporter@0.2.0

+-- karma-jasmine@1.1.0

+-- karma-jasmine-html-reporter@0.2.2

+-- ng2-toastr@4.0.1

+-- protractor@5.1.0

+-- rxjs@5.1.0

+-- ts-node@2.0.0

+-- tslint@4.5.0

+-- typescript@2.2.0

`-- zone.js@0.8.4

Browser: [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 ]

Chrome 56.0.2924.87

Language: [all | TypeScript X.X | ES6/7 | ES5]

TypeScript 2.2.1

Node (for AoT issues): node --version =

v6.9.1

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 ).

Issue 2:
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.

an angular template references invalid_variable.foo

this throws an error ReferenceError: invalid_variable is not defined or possibly Cannot read property 'foo' of undefined (the exact error isn't important)

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.

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.