Comparing version 2.2.1 to 2.2.2
@@ -19,6 +19,10 @@ 'use strict'; | ||
var message = err.message, | ||
stack = err.stack; | ||
return new _Bugsy2.default({ | ||
message: err.message, | ||
stack: err.stack | ||
message: message, | ||
stack: stack | ||
}); | ||
} |
@@ -25,7 +25,10 @@ 'use strict'; | ||
var message = err.message; | ||
var message = void 0; | ||
var name = void 0; | ||
var severity = void 0; | ||
var name = void 0; | ||
if (err.message) { | ||
message = err.message; | ||
} | ||
if (err instanceof _Bugsy2.default) { | ||
@@ -32,0 +35,0 @@ severity = err.severity; |
{ | ||
"name": "bugsy", | ||
"version": "2.2.1", | ||
"version": "2.2.2", | ||
"description": "Helper to deal with errors lifecycle in javascript", | ||
@@ -41,7 +41,7 @@ "author": "Nicolas Jakob <nicow.jakob@gmail.com>", | ||
"test:watch": "ava -w", | ||
"check": "npm run lint && npm run flow && npm run test", | ||
"validate": "npm run lint && npm run flow && npm run test", | ||
"bump:major": "npm version major -m \"Bump to %s\"", | ||
"bump:minor": "npm version minor -m \"Bump to %s\"", | ||
"bump:patch": "npm version patch -m \"Bump to %s\"", | ||
"prepublish": "npm run check && npm run build" | ||
"prepublish": "npm run validate && npm run build" | ||
}, | ||
@@ -48,0 +48,0 @@ "devDependencies": { |
@@ -39,3 +39,3 @@ | ||
const ranAway = bugsy.createDynamicError(RAN_AWAY, (name) => `${name} ran away, again`); | ||
const ranAway = bugsy.createDynamicError(RAN_AWAY, ({ name }) => `${name} ran away, again`); | ||
const throwMissed = bugsy.createError(THROW_MISSED, 'Throw totally missed'); | ||
@@ -49,3 +49,3 @@ | ||
} else if (r < 0.6) { | ||
throw ranAway(name); | ||
throw ranAway({ name }); | ||
} else { | ||
@@ -52,0 +52,0 @@ throw new Error(); |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
276
147155