Comparing version 0.2.12 to 0.2.13
@@ -49,3 +49,2 @@ var util = require('util') | ||
e = normalizeError(e) | ||
console.log('here: ', e.stack) | ||
} else { | ||
@@ -63,3 +62,2 @@ d.exit() | ||
} else if (d.currentStack) { | ||
console.log('there') | ||
e.stack += delimitter + d.currentStack | ||
@@ -66,0 +64,0 @@ } |
{ | ||
"name": "trycatch", | ||
"version": "0.2.12", | ||
"version": "0.2.13", | ||
"description": "An asynchronous domain-based exception handler with long stack traces for node.js", | ||
@@ -5,0 +5,0 @@ "homepage": "http://github.com/CrabDude/trycatch", |
@@ -56,2 +56,17 @@ var trycatch = require('../lib/trycatch') | ||
}) | ||
it('should catch Error object thrown without stack trace', function(done) { | ||
trycatch(function() { | ||
process.nextTick(function() { | ||
var err = new Error('Async') | ||
delete err.stack | ||
throw err | ||
}) | ||
} | ||
, function(err) { | ||
assert.equal(err.message, 'Async') | ||
assert.notEqual(err.stack, undefined) | ||
done() | ||
}) | ||
}) | ||
}) | ||
@@ -58,0 +73,0 @@ } |
47396
737