(no title)
camus2 | 8 years ago
No, this behavior is consistent with how asynchronous programming works in JS.
myDiv.addEventListener("click",function(event){
throw "error";
});
Nobody would expect that code to terminate a browser tab on error.> This also makes writing tests more difficult because tests often use exceptions to indicate failure.
Then use async functions, problem solved.
codedokode|8 years ago
That is because browser environment catches all exceptions and displays them in console. So effectively they become handled exceptions.
camus2|8 years ago
No, it has nothing to do with the developer console. It has everything to do with the fact that async exceptions do not bubble up in the main execution thread. Promises work the exact same way since they existed as libraries long before they were included in the language. It's about consistency, nothing more, nothing less.