othiym23/async-listener — pull request #7 by jacobgroundwater (2013-10-15 16:53:23+00:00)
Title: Error routing

I've added a bunch of tests that can be shared with core.

I've verified that they pass under trevnorris/node@4f53442e91161ee544db046f79c581db3b51f93a

As discussed with @trevnorris the error handling when listeners throwing is:

1. if `before`/`after` throws, the error is routed through *all* listeners, but is then propagated to `uncaughtException`. The error handlers of the async-listener *cannot* recover from this error.
2. if the `error` handler throws, the program the program basically hard quits, not even `uncaughtException` is called