Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| ae9cd4713b | |||
| 9f1f80d5f8 | |||
| e1262c2ca4 | |||
| f041623403 |
2
package-lock.json
generated
2
package-lock.json
generated
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@mojoio/sentry",
|
||||
"version": "1.0.3",
|
||||
"version": "1.0.5",
|
||||
"lockfileVersion": 1,
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@mojoio/sentry",
|
||||
"version": "1.0.3",
|
||||
"version": "1.0.5",
|
||||
"private": false,
|
||||
"description": "an unofficial abstraction package for sentry.io",
|
||||
"main": "dist/index.js",
|
||||
|
||||
@@ -5,7 +5,6 @@ import * as plugins from './sentry.plugins';
|
||||
*/
|
||||
export interface ISentryConstructorOptions {
|
||||
appName: string;
|
||||
|
||||
dsn: string;
|
||||
}
|
||||
|
||||
@@ -17,6 +16,15 @@ export class Sentry {
|
||||
plugins.sentry.init({
|
||||
dsn: optionsArg.dsn
|
||||
});
|
||||
process
|
||||
.on('unhandledRejection', (reason, p) => {
|
||||
console.error(reason, 'Unhandled Rejection at Promise', p);
|
||||
})
|
||||
.on('uncaughtException', err => {
|
||||
console.log(err);
|
||||
this.captureException(err);
|
||||
process.exit(1);
|
||||
});
|
||||
}
|
||||
|
||||
captureException(exceptionArg: any) {
|
||||
|
||||
Reference in New Issue
Block a user