promesa icon indicating copy to clipboard operation
promesa copied to clipboard

Global handler for catching any unhandled rejection

Open darky opened this issue 3 years ago • 2 comments

Would be good to have ability to setup global handler for catching any unhandled rejection Something like process.on('unhandledRejection', ... in Node.js https://nodejs.org/dist/latest-v18.x/docs/api/process.html#event-unhandledrejection

darky avatar May 14 '22 13:05 darky

The main issue I found for it, is that we need to dectect JVM, JS/Browser, JS/Node. If you think you can implement and uniform api that works for all the cases, the PR will be welcome.

niwinz avatar Oct 06 '22 12:10 niwinz

Probably promesa.util is good namespace to place this code.

niwinz avatar Oct 06 '22 12:10 niwinz