{"action":"created","issue":{"url":"https://api.github.com/repos/joyent/node/issues/7550","labels_url":"https://api.github.com/repos/joyent/node/issues/7550/labels{/name}","comments_url":"https://api.github.com/repos/joyent/node/issues/7550/comments","events_url":"https://api.github.com/repos/joyent/node/issues/7550/events","html_url":"https://github.com/joyent/node/issues/7550","id":32723678,"number":7550,"title":"Use of domains crashes program if `undefined` is thrown","user":{"login":"fresheneesz","id":149531,"avatar_url":"https://avatars.githubusercontent.com/u/149531?v=3","gravatar_id":"","url":"https://api.github.com/users/fresheneesz","html_url":"https://github.com/fresheneesz","followers_url":"https://api.github.com/users/fresheneesz/followers","following_url":"https://api.github.com/users/fresheneesz/following{/other_user}","gists_url":"https://api.github.com/users/fresheneesz/gists{/gist_id}","starred_url":"https://api.github.com/users/fresheneesz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fresheneesz/subscriptions","organizations_url":"https://api.github.com/users/fresheneesz/orgs","repos_url":"https://api.github.com/users/fresheneesz/repos","events_url":"https://api.github.com/users/fresheneesz/events{/privacy}","received_events_url":"https://api.github.com/users/fresheneesz/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2014-05-02T20:35:06Z","updated_at":"2015-02-28T00:04:47Z","closed_at":null,"body":"This demonstrates the problem:\r\n\r\n```\r\nvar domain = require('domain').create\r\n\r\nvar d = domain()\r\nd.on('error', function(err) {\r\n    console.log('wut') // never gets here\r\n})\r\n\r\nd.run(function() {\r\n    setTimeout(function() {\r\n        throw undefined\r\n    },0)\r\n})\r\n```\r\n\r\nInstead of getting a console log 'wut', I get the following output:\r\n\r\n```\r\nnode.js:237\r\n        er.domain = domain;\r\n                  ^\r\nTypeError: Cannot set property 'domain' of undefined\r\n    at process._fatalException (node.js:237:19)\r\n```\r\n\r\nSome bug in my code was causing it to throw undefined instead of a useful error, but that doesn't mean domains should crash because of it (obscuring the information that would have much more quickly lead to finding the mistake).\r\n\r\nI'm using node v0.10.26 on windows 7 64 bit"},"comment":{"url":"https://api.github.com/repos/joyent/node/issues/comments/76496007","html_url":"https://github.com/joyent/node/issues/7550#issuecomment-76496007","issue_url":"https://api.github.com/repos/joyent/node/issues/7550","id":76496007,"user":{"login":"fresheneesz","id":149531,"avatar_url":"https://avatars.githubusercontent.com/u/149531?v=3","gravatar_id":"","url":"https://api.github.com/users/fresheneesz","html_url":"https://github.com/fresheneesz","followers_url":"https://api.github.com/users/fresheneesz/followers","following_url":"https://api.github.com/users/fresheneesz/following{/other_user}","gists_url":"https://api.github.com/users/fresheneesz/gists{/gist_id}","starred_url":"https://api.github.com/users/fresheneesz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fresheneesz/subscriptions","organizations_url":"https://api.github.com/users/fresheneesz/orgs","repos_url":"https://api.github.com/users/fresheneesz/repos","events_url":"https://api.github.com/users/fresheneesz/events{/privacy}","received_events_url":"https://api.github.com/users/fresheneesz/received_events","type":"User","site_admin":false},"created_at":"2015-02-28T00:04:46Z","updated_at":"2015-02-28T00:04:46Z","body":"What's the status on this? This is still happening in node v0.10.29"}}