README
Sneeze-Client
Checkout github for different versions depending on your needs.
Usage
Options - Sneeze only takes a few options
url
- the url you want to post the error informationcontext
- the context in which you want to run your wrapped functions or callbacks, defaults to the Sneeze objectdata
- any extra data that you want to send when logging an error. Can be a function and will be executed in the context of the context option.onError
- a callback to execute when an error does occur, does not wait for the asynchronous logging to finish
Methods
Sneeze.listen([options])
- Binds an error handler to the window object and logs errors to the url option or default urlSneeze.catch(fn, [options])
- Runs a block of code 'fn' and logs any errors using the options or default options providedSneeze.wrapTryCatch(fn,[options])
- Returns a function that will execute fn in the context of options.context and log any errors if/when they occur. Good for anonymous or asynchronous callback functionsSneeze.configure([options])
- Override global default configurations by passing in the options here