docs
docs copied to clipboard
Complete documentation on app.config.errorHandler
What problem does this feature solve?
Ref : https://vuejs.org/api/application.html#app-config-errorhandler .
I recently introduced a bug in a plugin that implements app.config.errorHandler
that would impact developers mainly during local development : errors are never displayed in the console.
situation
When I read the documentation, it was not clear to me if the errors were still reported in the console. I wrongly supposed that it was the case. After investigation in the VujeJS source code, I understood that if an errorHandler is set, then the default handler (console.error) is not called.
Hypothesis of cause
- the documentation does not warn about the need for the developer to call manually console.error / the default handler
- the forward to the default handler was not easy to implement : I tried
handleError(error, null, 10 as ErrorCodes /* ErrorCodes.APP_ERROR_HANDLER */, false)
but I am not sure if it is the right way to do it...
Suggestion of counter mesure
I would recommend to add an example in the documentation to forward error handling to the default VueJS handler.
What does the proposed API look like?
N/A