Error code works as expected

pull/2/head
Louis Chatriot 11 years ago
parent e5aff86501
commit c4b29f789d
  1. 17
      lib/datastore.js

@ -546,4 +546,21 @@ Datastore.prototype.remove = function () {
};
process.on('uncaughtException', function (err) {
console.log(err);
});
var ds = new Datastore();
ds.find({}, function (err) {
process.nextTick(function () {
ds.insert({ bar: 1 }, function (err) {
//We never get here
});
});
throw 'foo';
});
module.exports = Datastore;

Loading…
Cancel
Save