promesa
promesa copied to clipboard
Global handler for catching any unhandled rejection
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
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.
Probably promesa.util is good namespace to place this code.