view-error-boundary

Vue Error Boundaries

Usage no npm install needed!

<script type="module">
  import viewErrorBoundary from 'https://cdn.skypack.dev/view-error-boundary';
</script>

README

error-boundaries

Error Handling

Install simple package to serve the index.html like http-server

Where the ideas came from:

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.