{"action":"created","issue":{"url":"https://api.github.com/repos/nodejs/node/issues/2911","labels_url":"https://api.github.com/repos/nodejs/node/issues/2911/labels{/name}","comments_url":"https://api.github.com/repos/nodejs/node/issues/2911/comments","events_url":"https://api.github.com/repos/nodejs/node/issues/2911/events","html_url":"https://github.com/nodejs/node/issues/2911","id":106815295,"number":2911,"title":"Throwing error in `Promise.then` does not throw uncaught exception","user":{"login":"bminer","id":73755,"avatar_url":"https://avatars.githubusercontent.com/u/73755?v=3","gravatar_id":"","url":"https://api.github.com/users/bminer","html_url":"https://github.com/bminer","followers_url":"https://api.github.com/users/bminer/followers","following_url":"https://api.github.com/users/bminer/following{/other_user}","gists_url":"https://api.github.com/users/bminer/gists{/gist_id}","starred_url":"https://api.github.com/users/bminer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bminer/subscriptions","organizations_url":"https://api.github.com/users/bminer/orgs","repos_url":"https://api.github.com/users/bminer/repos","events_url":"https://api.github.com/users/bminer/events{/privacy}","received_events_url":"https://api.github.com/users/bminer/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-09-16T16:55:09Z","updated_at":"2015-09-16T20:19:37Z","closed_at":"2015-09-16T17:34:10Z","body":"Consider the following code:\r\n\r\n```javascript\r\nvar promise = new Promise(function(resolve, reject) {\r\n\tsetTimeout(resolve, 10);\r\n});\r\npromise.then(function() {\r\n\tthrow new Error(\"foo\");\r\n});\r\n```\r\n\r\nIn this example, the program runs for 10 ms. and terminates with exit code 0 without printing the Error.  The expected behavior is for Node to throw an uncaught exception and print a meaningful stack trace... then terminate with exit code 1.\r\n\r\nThis is handled properly by Chromium 44 running V8 4.4.63.19.  Why doesn't this work in Node.js 4.0.0 with V8 4.5.103.30?"},"comment":{"url":"https://api.github.com/repos/nodejs/node/issues/comments/140875200","html_url":"https://github.com/nodejs/node/issues/2911#issuecomment-140875200","issue_url":"https://api.github.com/repos/nodejs/node/issues/2911","id":140875200,"user":{"login":"bminer","id":73755,"avatar_url":"https://avatars.githubusercontent.com/u/73755?v=3","gravatar_id":"","url":"https://api.github.com/users/bminer","html_url":"https://github.com/bminer","followers_url":"https://api.github.com/users/bminer/followers","following_url":"https://api.github.com/users/bminer/following{/other_user}","gists_url":"https://api.github.com/users/bminer/gists{/gist_id}","starred_url":"https://api.github.com/users/bminer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bminer/subscriptions","organizations_url":"https://api.github.com/users/bminer/orgs","repos_url":"https://api.github.com/users/bminer/repos","events_url":"https://api.github.com/users/bminer/events{/privacy}","received_events_url":"https://api.github.com/users/bminer/received_events","type":"User","site_admin":false},"created_at":"2015-09-16T20:19:36Z","updated_at":"2015-09-16T20:19:36Z","body":"@rvagg - I don't understand your comment.  Promises are not as clearly bound to time periods?  What's the timing issue?"}}