Vue.config.errorHandler doesn't give any useful info

How are people actually using Vue.config.errorHandler? The vm argument doesn’t even give me the component name (nothing like that under vm.$options or anywhere else it seems). And I can’t get the stack trace or location of the where the error arose. All I can see is the err.name and err.message which is fairly useless on its own. So what are you actually supposed to be able to do with this error handler?

And why does throwing within that error handler not trigger an error in window.addEventListener("error") callback?

A Specific example would be helpful. E.g. the name should be available (provided the developer actually defined a name for the component in its options).

The error also should be the original error object that triggered the error handler. But e.g. if you have some code somewhere (could be from any 3rd party code or your own) that catches an errorlocally on its own and re-throws with a fresh instance of Error it produced itself (which is an anti-pattern but nonetheless pretty common), then that new Error is what you get in the errorHandler and you will have lost the stack trace in that process.

In short: It’s hard to provide recommendations without a concrete problem to look at.