内容简介:Creates bug reports for uncaught exceptions and unhandled rejections. Works like a DYI Sentry client. Can publish bug reports on different trackers simultaneously.Registers event handlers for
unhandler
Creates bug reports for uncaught exceptions and unhandled rejections. Works like a DYI Sentry client. Can publish bug reports on different trackers simultaneously.
Install
$ npm install @tuplo/unhandler # or with yarn $ yarn add @tuplo/unhandler
Usage
import { unhandler } from '@tuplo/unhandler';
Registers event handlers for uncaughtException and unhandledRejection
unhandler({
appName: 'my-app-1',
providers: {
github: {
user: 'tuplo',
repo: 'unhandler',
token: 'secret-token-xxxxxxx',
},
},
});
throw new Error('buggy bug');
// will create a GitHub issue with title "[my-app-1] buggy bug"
Creates bug reports directly with submitError
import { submitError } from '@tuplo/unhandler';
const error = new Error('buggy bug');
await submitError(error, {
appName: 'my-app-1',
providers: {
github: {
user: 'tuplo',
repo: 'unhandler',
token: 'secret-token-xxxxxxx',
},
},
});
// will create a GitHub issue with title "[my-app-1] buggy bug"
Error tracking providers
- GitHub Issues
- Trello
- JIRA
API
unhandler(options)
options
appName: string
The name of the application triggering the error.
providers: Provider[]
GitHub
| name | type | description |
|---|---|---|
| user | string | The user or organization, owner of the repository where issues will be created. |
| repo | string | The name of the repository where issues will be created. |
| token | string | GitHub's personal access token with a repo scope. |
Contribute
Contributions are always welcome!
License
MIT
以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持 码农网
本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们。
JSP网站开发典型模块与实例精讲
李振捷 / 电子工业出版社 / 2006-8 / 50.0
本书是典型模块与实例精讲丛书中的一本。 本书讲解了使用JSP开发网站系统的经典模块和工程实例,基本囊括了JSP的重点技术,对这些模块稍加修改就可以直接使用到实际项目中。为了方便本书的读者交流在学习中遇到的问题,特地在本书的服务网站上公布了很多QQ群组,读者只要拥有QQ号码,就可以参与到本书的QQ学习群组中一起讨论学习心得。本书的作者还在一定的时间给读者提供在线答疑服务。一起来看看 《JSP网站开发典型模块与实例精讲》 这本书的介绍吧!