JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 5
  • Score
    100M100P100Q27942F
  • License MIT license

Provied a single callback that runs when browser throws any uncaught exception

Package Exports

  • catcherr

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (catcherr) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Catcherr

Did you ever deploy a web app, only to discover that The Grate Safari throws an exception, and you have no idea why?
Catcherr catches those err's for you.

Installation

Using npm:

$ npm install catcherr

In a browser, using cdn:

<script src="https://cdn.jsdelivr.net/npm/catcherr/catcherr.js" type="module"></script>

Usage

Using es6 imports

<script type="module">
    import catcher from "catcherr.js" // if you dont use a bundler, you can replace with https://cdn.jsdelivr.net/npm/catcherr/catcherr.js
    catcher(error => console.log("Caught global error: ", error))
</script>

Importing in html

<script src="https://cdn.jsdelivr.net/npm/catcherr/catcherr.js" type="module"></script>
<script>
    window.onError = error => console.log("Caught global error: ", error)
</script>