sindresorhus / electron-unhandled

Catch unhandled errors and promise rejections in your Electron app
MIT License
448 stars 26 forks source link

Handle Bluebird unhandledrejection #7

Closed brenthompson closed 6 years ago

brenthompson commented 6 years ago

Bluebird.js promises don't have event.reason, they instead have event.detail.reason. An unhanded rejection from bb causes an exception from your plugin. Given Bluebird's popularity it's probably worthwhile handing this case at least until they fix their side. As you can see they've taken a couple of kicks at this already. Links to their issues: https://github.com/petkaantonov/bluebird/issues/1447 https://github.com/petkaantonov/bluebird/issues/1509

sindresorhus commented 6 years ago

I appreciate the PR, but I'm not interested in adding this. Bluebird should follow the Promise spec. Adding support for weird behavior in custom Promise libraries is a slippery slope.