Is there any way to have an app run code (e.g. send an email message so that any erroneous code can be fixed quickly) whenever an unhandled exception occurs?
ASP.NET has the built-in Application_Error just for this purpose which can be customized in Global.asax.
Having worked a lot with getting reliable exception handling in Meteor I can tell you the problem is that Meteor doesn’t seem to have a consistent error handling API internally, nor does it expose any hooks for applications to track those exceptions.
Hence all the monkeypatching that goes on in Kadira. I’ve adapted some of that for my own purposes to use Rollbar error tracking.
What would be great is to have a Meteor.onError that would be called consistently on client and server and not involve parsing strings to figure out what the heck happened.