Closed
Description
Version
2.5.13
Reproduction link
https://jsfiddle.net/zr7rz6xh/8/
Steps to reproduce
Vue.config.errorHandler = function (err, vm, info) {
alert("handler");
};
new Vue({
el: '#app',
mounted: function() {
return new Promise(function(resolve, reject) {
throw new Error('err');
});
}
})
What is expected?
errorHandler should be called
What is actually happening?
Uncaught (in promise) Error: err
Vue.config.errorHandler is not called if the error occurs inside a promise or await/async function.
I want to use the created hook with an await call, so it has to be async. But then the errorHandler is ignored.