{"action":"closed","issue":{"url":"https://api.github.com/repos/nodejs/node/issues/7468","repository_url":"https://api.github.com/repos/nodejs/node","labels_url":"https://api.github.com/repos/nodejs/node/issues/7468/labels{/name}","comments_url":"https://api.github.com/repos/nodejs/node/issues/7468/comments","events_url":"https://api.github.com/repos/nodejs/node/issues/7468/events","html_url":"https://github.com/nodejs/node/issues/7468","id":162816510,"number":7468,"title":"Domains appear to be broken in NodeJS 4 and 6.","user":{"login":"vincentwoo","id":613320,"avatar_url":"https://avatars.githubusercontent.com/u/613320?v=3","gravatar_id":"","url":"https://api.github.com/users/vincentwoo","html_url":"https://github.com/vincentwoo","followers_url":"https://api.github.com/users/vincentwoo/followers","following_url":"https://api.github.com/users/vincentwoo/following{/other_user}","gists_url":"https://api.github.com/users/vincentwoo/gists{/gist_id}","starred_url":"https://api.github.com/users/vincentwoo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vincentwoo/subscriptions","organizations_url":"https://api.github.com/users/vincentwoo/orgs","repos_url":"https://api.github.com/users/vincentwoo/repos","events_url":"https://api.github.com/users/vincentwoo/events{/privacy}","received_events_url":"https://api.github.com/users/vincentwoo/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/nodejs/node/labels/domain","name":"domain","color":"e11d21"}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-06-29T00:26:53Z","updated_at":"2016-06-29T00:56:31Z","closed_at":"2016-06-29T00:56:31Z","body":"* **Version**: Node 6.2.0 and 4.4.0\r\n* **Platform**: Linux\r\n\r\nI understand that domains are deprecated, but expect that they will function in the versions of Node in which they are supported. My reading of [the docs](https://nodejs.org/api/domain.html) indicates that domains are a way by which you can catch a broad range of errors without crashing the Node process:\r\n\r\n> Domains provide a way to handle multiple different IO operations as a single group. If any of the event emitters or callbacks registered to a domain emit an 'error' event, or throw an error, then the domain object will be notified, rather than losing the context of the error in the process.on('uncaughtException') handler, or causing the program to exit immediately with an error code.\r\n\r\nHowever, a very short test file to the point doesn't seem to work:\r\n\r\n```js\r\nconsole.log (\"hello!\")\r\n\r\nrequire(\"domain\")\r\n  .create()\r\n  .on(\"error\", function(error) {\r\n    console.log(\"there was an error!\");\r\n  })\r\n  .run(function() {\r\n    throw \"an error\";\r\n  });\r\n\r\nconsole.log (\"this doesnt print for some reason\");\r\n```\r\n\r\nI would expect `domain` to swallow the error and allow execution to continue, but I don't see the final console.log in the output. The exit code of the process is still 0, though:\r\n\r\n```\r\nvwoo@ubuntu:~/execute$ node test.js\r\nhello!\r\nthere was an error!\r\nvwoo@ubuntu:~/execute$ echo $?\r\n0\r\n```\r\n\r\nAm I misunderstanding something very basic? Something seems... wrong."}}
{"actor":{"display_login":"TheAlphaNerd"}}