joyent/node — pull request #3721 by isaacs (2012-07-16 23:42:03+00:00)
Title: Domain stack leak

Because a throw jumps out of the current run-to-completion flow, errors that are caught by domains never end up calling `domain.exit()`, resulting in an explosion of the domain stack.

Fix: Call `domain.exit()` after emitting the error event on the domain.