{"action":"created","issue":{"url":"https://api.github.com/repos/paulmillr/es6-shim/issues/311","labels_url":"https://api.github.com/repos/paulmillr/es6-shim/issues/311/labels{/name}","comments_url":"https://api.github.com/repos/paulmillr/es6-shim/issues/311/comments","events_url":"https://api.github.com/repos/paulmillr/es6-shim/issues/311/events","html_url":"https://github.com/paulmillr/es6-shim/issues/311","id":51940979,"number":311,"title":"Unhandled Promise errors","user":{"login":"timoxley","id":43438,"avatar_url":"https://avatars.githubusercontent.com/u/43438?v=3","gravatar_id":"","url":"https://api.github.com/users/timoxley","html_url":"https://github.com/timoxley","followers_url":"https://api.github.com/users/timoxley/followers","following_url":"https://api.github.com/users/timoxley/following{/other_user}","gists_url":"https://api.github.com/users/timoxley/gists{/gist_id}","starred_url":"https://api.github.com/users/timoxley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/timoxley/subscriptions","organizations_url":"https://api.github.com/users/timoxley/orgs","repos_url":"https://api.github.com/users/timoxley/repos","events_url":"https://api.github.com/users/timoxley/events{/privacy}","received_events_url":"https://api.github.com/users/timoxley/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/paulmillr/es6-shim/labels/Promises","name":"Promises","color":"009800"},{"url":"https://api.github.com/repos/paulmillr/es6-shim/labels/pull%20request%20wanted","name":"pull request wanted","color":"fbca04"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":12,"created_at":"2014-12-15T01:44:29Z","updated_at":"2015-08-22T16:55:58Z","closed_at":null,"body":"Currently, if there's no `.catch` errors will vanish mysteriously. Native promises in chrome  41.0.2249.0 (current canary) will print a message about unhandled promise errors:\r\n\r\n![image](https://cloud.githubusercontent.com/assets/43438/5430004/891d6aa6-843d-11e4-8df2-2a924e714637.png)\r\n\r\nbut if the es6-shim is loaded, it clobbers the native Promise because it doesn't seem to support subclassing, and replaces it with an insidious version with total error suppression:\r\n\r\n![image](https://cloud.githubusercontent.com/assets/43438/5430022/f68b9fea-843d-11e4-9f99-21409ce18171.png)\r\n\r\nNot sure what the best approach is to solve this."},"comment":{"url":"https://api.github.com/repos/paulmillr/es6-shim/issues/comments/133726443","html_url":"https://github.com/paulmillr/es6-shim/issues/311#issuecomment-133726443","issue_url":"https://api.github.com/repos/paulmillr/es6-shim/issues/311","id":133726443,"user":{"login":"ljharb","id":45469,"avatar_url":"https://avatars.githubusercontent.com/u/45469?v=3","gravatar_id":"","url":"https://api.github.com/users/ljharb","html_url":"https://github.com/ljharb","followers_url":"https://api.github.com/users/ljharb/followers","following_url":"https://api.github.com/users/ljharb/following{/other_user}","gists_url":"https://api.github.com/users/ljharb/gists{/gist_id}","starred_url":"https://api.github.com/users/ljharb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ljharb/subscriptions","organizations_url":"https://api.github.com/users/ljharb/orgs","repos_url":"https://api.github.com/users/ljharb/repos","events_url":"https://api.github.com/users/ljharb/events{/privacy}","received_events_url":"https://api.github.com/users/ljharb/received_events","type":"User","site_admin":false},"created_at":"2015-08-22T16:55:58Z","updated_at":"2015-08-22T16:55:58Z","body":"Correct. You can never throw an error outside of a Promise - that's how they work everywhere. You can do `setTimeout(function () { throw err; }, 0)` but that's basically your only option.\r\n\r\nHandle the error in the right place: inside the promise :-)"}}