-
-
Notifications
You must be signed in to change notification settings - Fork 314
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't catch exception thrown inside process.nextTick callback #836
Comments
I think exceptions inside callback must be explicitly catched and then reject promise |
@origin-yaropolk thank you for reporting. I get the point, providing a fix for it. Just curious, can you tell me more about the platforms and OS distro/version where this happens? As I did not got any complains here for years, I would like to know more about this ;-) |
Sure. This is hardware config for one of them
|
@origin-yaropolk interestingly this IS inside a try/catch ... so maybe you can give more details when / how often you are calling this. |
I call |
@origin-yaropolk ... thank you!! Some more questions:
Have a look at here: #616 |
|
Describe the bug
If
process.nextTick
's callback throws exception, it can be catched neither bytry...catch
block nor.catch
callbackTo Reproduce
For example:
add exception inside
mem()
function herelike this
and then try to catch like
or
mem().catch(err => console.log(err));
it won't be catched. It received only in
process.on('uncaughtException')
Expected behavior
It must be catched
Environment (please complete the following information):
Additional context
Some of my users faced with problem - while collecting
mem()
info it throws exception, that i cant catch. Unfortunately, I can't provide you any stack trace to investigate the reason, caused exeption. I only know that they seewrite EPIPE
error message.The text was updated successfully, but these errors were encountered: