nearinfinity/node-oracle — pull request #57 by raztus (2013-07-02 23:51:26+00:00)
Title: Handle exceptions within callback functions by calling node::FatalException()

These changes address the fact that in callbacks passed to the node-oracle functions, uncaught exceptions are handled however V8 wants to handle them, and are not catcheable in the javascript:
```javascript
oracle.connect(settings, function(err, connection) {
try {
connection.execute(query, [], function(err, results) {
undefined.trim(); // Exception thrown by this line is handled in V8 land; node is unaware
return results;
});
} catch (ex) {
console.error(ex); // never hit
}
});
```

Using `v8::TryCatch` allows us to return the exception as a `node::FatalException`. For another example, see: https://github.com/kkaefer/node-cpp-modules/blob/master/05_threadpool/modulename.cpp