I would like to catch uncaught serverside exceptions and log them, before rethrowing, but I cannot figure out how to do this in Meteor. I tried catching the uncaughtException event in Node, but Meteor seems to override this, so my handler is never called.
So, what is the way to catch uncaught exceptions in Meteor, so they may be logged, and rethrow them?
No, I have create a folder called server inside my app and create a file called exception.js and put the code inside it, and it works with me, But Did you mean that to use Meteor.bindEnvironment to prevent meteor from crash?