6 Commits

Author SHA1 Message Date
ae9cd4713b 1.0.5 2019-06-20 11:01:27 +02:00
9f1f80d5f8 fix(core): update 2019-06-20 11:01:26 +02:00
e1262c2ca4 1.0.4 2018-11-01 23:44:49 +01:00
f041623403 fix(errors): now handles uncaught errors 2018-11-01 23:44:49 +01:00
f1528a799b 1.0.3 2018-10-31 13:22:30 +01:00
7d28966e5a fix(security): add snyk file 2018-10-31 13:22:29 +01:00
4 changed files with 15 additions and 3 deletions

4
.snyk Normal file
View File

@@ -0,0 +1,4 @@
# Snyk (https://snyk.io) policy file, patches or ignores known vulnerabilities.
version: v1.12.0
ignore: {}
patch: {}

2
package-lock.json generated
View File

@@ -1,6 +1,6 @@
{
"name": "@mojoio/sentry",
"version": "1.0.2",
"version": "1.0.5",
"lockfileVersion": 1,
"requires": true,
"dependencies": {

View File

@@ -1,6 +1,6 @@
{
"name": "@mojoio/sentry",
"version": "1.0.2",
"version": "1.0.5",
"private": false,
"description": "an unofficial abstraction package for sentry.io",
"main": "dist/index.js",

View File

@@ -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) {