laverdet/node-fibers — pull request #105 by metamatt (2013-03-21 23:41:53+00:00)
Title: Forward unhandled exceptions to main event loop

Currently, the futures library calls process.exit() if client code throws an exception from a future resolve callback: such errors are always fatal to the whole process. This behavior is more draconian than necessary; instead, as suggested in https://github.com/laverdet/node-fibers/commit/95c1b61cfdc6dc65f173695dc00cffa116d6681c#commitcomment-2840222, let's forward such exceptions to the uncaughtException handler, so they're neither more nor less fatal than other exceptions.

This PR adds a test for this behavior (which currently fails), and a fix (after which the test works).