raszi/node-tmp — pull request #14 by tschaub (2013-06-20 17:42:59+00:00)
Title: Only add uncaughtException listener when API methods are called

Instead of adding the `uncaughtException` listener whenever the `tmp.js` module is required, the listener could be registered when one of the exported methods are used. Listeners could then be unregistered after API method callbacks are called.

Without this change, `tmp.js` is [frequently attributed](https://www.google.com/search?q=tmp.js+error) as the source of uncaught errors.