I'd like to catch uncaught exceptions in Meteor and handle them in a graceful fashion. Is there an analogue to Node's process.on('uncaughtException', function(err) {})
?
I'm interested in solutions both in the client and in the server.
I am testing this idea for server side uncaught exception handling.
Fiber = Npm.require('fibers');
process.on('uncaughtException', function(err){
console.log(err.message);
console.log(err.stack);
Fiber( function(){
Logs.insert({ ... }) // Logs is a collection
}).run();
process.exit(1)
};
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With