-
Notifications
You must be signed in to change notification settings - Fork 30k
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
Console class ignores ignoreErrors
on Node.js v14.3.0
#33628
Comments
ignoreErrors
on Node.js v14.3.0
@ronag PTAL |
It seems because of ws = require('fs').createWriteStream('./foo.log');
ws.destroy();
ws.write('foo'); do not throw error any more. |
This is expected. You can't error an already destroyed stream. #29197 |
So, errors thrown on Node.js v12 & v10 were bug, that was fixed somewhere on v13/v14 ? |
But I think it's a breaking change. |
Yes, it was labeled as semver-major. |
Not sure exactly what you mean. A lot of things fall under that description. But this specific case wasn't a bug per se, but it was ambiguous/undefined behavior that we changed to make it predictable. There were also other problems this caused that the change resolved. It was a very long discussion as you can notice from the PR and not at decision taken lightly. |
Thanks for quick response 👍 I saw there was long disucssion in #29197, and the change seems reasonable to me. I am closing this issue as "as-designed" or similar. |
What steps will reproduce the bug?
repro.js
which contents is below:ndoe repro.js
How often does it reproduce? Is there a required condition?
Every time it reproduces on the above environment with the above procedure.
What is the expected behavior?
Invoking
c.log
should throw error, since the underlying streams are already destroyed, like below:Note) The expected errors are thrown on Node.js v12.16.3 and v10.20.1.
What do you see instead?
No errors thrown, and script runs succesfully.
It seems that
Console
class ignoresignorErrors
option.The text was updated successfully, but these errors were encountered: