-
Notifications
You must be signed in to change notification settings - Fork 5
Break-on-exception doesn't work for forked promises #3
Copy link
Copy link
Open
Description
Chrome's break-on-exception doesn't always break when exceptions are thrown in a promise callback.
it('confuses me', () => {
let start = new Promise(r => setTimeout(r, 10))
let forked = delay.then(() => { throw "huh" })
return wantBroken ? forked : start
})
Returning start works fine, but returning forked won't break (but it does print to the console). If you add a catch block to runTest, it catches the error, so it's not like the promise is just swallowing it.
I've also noticed that bluebird promises don't have this issue. The problem with bluebird is that stack traces are very wrong (even with longStackTrace on).
I think the ideal would be to figure out how bluebird does it, and replicate.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels