Skip to content

add a function to register an unhandled promise rejection handler#7

Open
BuBuaBu wants to merge 1 commit intopyericz:masterfrom
BuBuaBu:master
Open

add a function to register an unhandled promise rejection handler#7
BuBuaBu wants to merge 1 commit intopyericz:masterfrom
BuBuaBu:master

Conversation

@BuBuaBu
Copy link
Copy Markdown

@BuBuaBu BuBuaBu commented Oct 28, 2020

When a promise is rejected and the calling application fail or forget to catch it,
The error is silently ignored making things hard to debug.
This kind of mistake is considered has a fatal runtime error in nodejs.

We this PR, we can register a uniq and global "Unhandled Promise Rejection" handler. This way, the application can choose the way to manage this kind of issue. (logging, exit, ...)

@BuBuaBu BuBuaBu force-pushed the master branch 2 times, most recently from b2aee88 to 6b534cd Compare October 28, 2020 02:34
@BuBuaBu
Copy link
Copy Markdown
Author

BuBuaBu commented Oct 30, 2020

Hi @pyericz could you have a look at this PR?

@adriweb
Copy link
Copy Markdown
Contributor

adriweb commented Jan 6, 2021

Hi, any news ? :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants