error-boundaries
Error Handling
Install simple package to serve the index.html like http-server
Where the ideas came from:
- https://reactjs.org/blog/2017/07/26/error-handling-in-react-16.html
- https://medium.com/@dillonchanis/handling-errors-in-vue-with-error-boundaries-91f6ead0093b
- https://vuejs.org/v2/api/#errorCaptured
Usage
Vue.use(ErrorBoundary, {
name: 'ErrorBoundary',
middlewares: [
consoleMd,
example
]
})
It will run each middleware with these conditions:
- If you return a component or false, the error won't propagate and no other middlware will run.
- If you just run some logic or return true the error will propagate and will continue to run the remain middlewares.