Commit 194269bf authored by Anton's avatar Anton

Add handle-error plugin

parent 5ebbb9e2
export default ({ Vue }) => {
Vue.config.errorHandler = (err, vm, info) => {
// err: error trace
// vm: component in which error occured
// info: Vue specific error information such as lifecycle hooks, events etc.
console.debug('errorHandler', err, vm, info)
}
Vue.prototype.$handleError = function (context, err = {}, message = 'errors.unknown_error') {
if (!context) {
console.error('Unable to handle error, no vue context given', message, err)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment