CrabDude/trycatch — Issue #3: trycatch not working with mongojs module
Author: jayyy0v
Created: 2011-12-26 16:44:20+00:00
State: open

Hi,

I was waiting for a solution like this. It will simply the life of many noders. Thanks to your efforts.

I had tried examples found with this library and it's working like a charm. So I went ahead to use it in my application to throw errors from my database (mongodb) layer. I am using mongojs ( https://github.com/gett/mongojs ) , a simplified wrapper around mongo-native ( https://github.com/christkv/node-mongodb-native ) driver.

While trycatch works very well with mongo-native callbacks, it is unable to catch exceptions thrown by mongojs callbacks.

I would like to bring this case to your attention since I read that trycatch hooks at low-levels node's event source api's and why this particular module is not working as expected ?

You can find my working & non-working code samples in this issue https://github.com/gett/mongojs/issues/10