Angular has no magic. If there is an uncaught error, it spreads over areas until it hits the window, and then an error event is issued - the same behavior as the error, without reaction.
var App = React.createClass({ render: function(){ throw new Error("rawr!"); return <div>Hello, world!</div> } }); window.addEventListener('error', function(e){

If you look at cross-browser support, update this answer or add a comment with quotes.
Instead of writing it to the console (which is already happening by default), you can send it anywhere.
Unlike some other frameworks, an uncaught error is always an error in your code. This should never happen.
You may also need special handling of promise errors by explicitly adding .catch(reportError) to the end of the chain and checking that it is a TypeError or ReferenceError.
Fakerain brigand
source share