evanw/node-source-map-support — pull request #3 by bpytlik (2013-03-05 02:09:19+00:00)
Title: add support to not listen for uncaught exceptions

While exiting on an uncaught exception is a reasonable default, there are situations where it's less than ideal (like running inside a test framework); however, it is nice to still have a CS based stack trace instead of a js based one. This change provides an option to disable the automatic termination of the process while retaining the CS based stack trace.

I think the change is a bit of a hack, but I couldn't think of any other way to do it without breaking backward compatibility. I'm open to suggestions on that front as well as a better name for the function added. If you're open to breaking backwards compatibility, then I'd suggest making the module export a function which takes an argument of either true or false which indicates whether to end the process on an uncaught exception. Then (in coffeescript) the require would look like:
sms = require("source-map-support")(true)

Thanks.