Comparing version 0.0.6 to 0.0.7
@@ -42,11 +42,13 @@ var HTTP_STATUS_CODES = require('http').STATUS_CODES; | ||
process.on('uncaughtException', function(err) { | ||
self.log('Airbrake: Uncaught Exception:'); | ||
self.log(err.stack); | ||
self.notify(err, function(notifyErr, url) { | ||
if (notifyErr) { | ||
self.log('Uncaught Exception: Could not notify Airbreak!'); | ||
self.log('Airbrake: Could not notify service.'); | ||
self.log(notifyErr.stack); | ||
} else { | ||
self.log('Uncaught Exception: Airbreak was notified: ' + url); | ||
self.log('Airbrake: Notified service: ' + url); | ||
} | ||
self.log(err.stack); | ||
process.exit(1); | ||
@@ -53,0 +55,0 @@ }); |
@@ -5,3 +5,3 @@ { | ||
"description": "Node.js client for airbrakeapp.com, formerly known as hoptoadapp.com.", | ||
"version": "0.0.6", | ||
"version": "0.0.7", | ||
"homepage": "https://github.com/felixge/node-airbrake", | ||
@@ -8,0 +8,0 @@ "repository": { |
@@ -9,2 +9,3 @@ var common = require('../common'); | ||
sinon.stub(airbrake, 'notify'); | ||
sinon.stub(airbrake, 'log'); | ||
@@ -24,3 +25,7 @@ airbrake.handleExceptions(); | ||
assert.ok(airbrake.notify.calledWith(err)); | ||
assert.ok(airbrake.log.calledWith('Airbrake: Uncaught Exception:')); | ||
assert.ok(airbrake.log.calledWith(err.stack)); | ||
airbrake.log.restore(); | ||
var notifyCb = airbrake.notify.args[0][1]; | ||
@@ -34,4 +39,3 @@ | ||
assert.ok(/uncaught exception: airbreak was notified/i.test(airbrake.log.args[0][0])); | ||
assert.strictEqual(airbrake.log.args[1][0], err.stack); | ||
assert.ok(/notified service/i.test(airbrake.log.args[0][0])); | ||
assert.ok(process.exit.calledWith(1)); | ||
@@ -50,5 +54,4 @@ | ||
assert.ok(/uncaught exception: could not notify airbreak/i.test(airbrake.log.args[0][0])); | ||
assert.ok(/could not notify service/i.test(airbrake.log.args[0][0])); | ||
assert.strictEqual(airbrake.log.args[1][0], notifyErr.stack); | ||
assert.strictEqual(airbrake.log.args[2][0], err.stack); | ||
assert.ok(process.exit.calledWith(1)); | ||
@@ -55,0 +58,0 @@ |
Sorry, the diff of this file is not supported yet
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
Native code
Supply chain riskContains native code (e.g., compiled binaries or shared libraries). Including native code can obscure malicious behavior.
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
1212549
407
12