cucumber/cucumber-js — pull request #253 by chirayuk (2014-10-04 04:15:35+00:00)
Title: Use nodejs domain error handler instead of uncaughtError handle

Refer https://github.com/angular/protractor/issues/876#issuecomment-57892972.
Prefer using the domain error handler instead of the top level Cucumber uses the top level uncaught error handler to catch exceptions
caught by tests. Refer commit
https://github.com/cucumber/cucumber-js/commit/9091129df4866cf705fb4ea7fb488f81e7cb96c2
and issue #51. A good approach would be to wrap the test code
executions in try/catch blocks and use that exception instead of the
`uncaughtException` handler. Another approach is to use the error
handler of a nodejs domain instead of the top level global
uncaughtException handler. In this commit, I'm using the domain level
error handler approach.