@tinkoff/error-handlers
v0.7.3
Published
Library for logging of global errors and unhandled promise rejections. May work in browsers and nodejs.
Downloads
152
Maintainers
Keywords
Readme
Error handlers
Library for logging of global errors and unhandled promise rejections. May work in browsers and nodejs.
Api
globalErrorHandler = (logger: Logger = console)
- init logging of global errorsunhandledRejectionHandler = (logger: Logger = console)
- init logging of unhandled rejection promise
Parameters
Logger
- used for logging errorsexport interface Logger { warn: Function; error: Function; }