error-patch

A patched error object to catch all errors

Usage no npm install needed!

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

README

:warning: ERROR PATCH!

Patch all error classes so that you can run them through a callback before throwing.

Usage

const errorPatch = require(`error-patch`)

errorPatch(error => {
  // handle the error object
  someLoggerFunction(error)
})

throw new Error('ERRRRORRRRR!!!')