-
Notifications
You must be signed in to change notification settings - Fork 29.6k
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
emit after 'error' #28710
Comments
ping @mcollina |
|
@ronag I was wondering if it would be okay to allow 'error' events as well? Like the one here. Throwing before all subsequent errors are thrown would prevent those error logs from being shown. |
In at least streams we don't want/allow multiple error events. |
I see. So are we talking about different behaviour for different modules (subsequent errors not allowed in streams but allowed in crypto (or similar ones))? |
Yea, I guess so. I would rather it would be consistent everywhere but achieving that is a high goal. I think we should start focusing on making it sensible, e.g.
etc... |
Here is an updated list based on master in case you want to have a go at it https://gist.github.com/ronag/3c4fdf8f73e2671efa8b9456d7bc4746 |
This comment has been minimized.
This comment has been minimized.
I think all of the most important issues with post Next step (if any) would be to ensure |
There is work left to do on events after |
PR-URL: #32275 Refs: #28710 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: James M Snell <[email protected]>
PR-URL: #32276 Refs: #28710 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]>
PR-URL: nodejs#32275 Refs: nodejs#28710 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: James M Snell <[email protected]> Backport-PR-URL: nodejs#32372
PR-URL: #32276 Refs: #28710 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]>
PR-URL: #32276 Refs: #28710 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]>
Backport-PR-URL: #32372 PR-URL: #32275 Refs: #28710 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: James M Snell <[email protected]> Backport-PR-URL: #32372
Backport-PR-URL: #32372 PR-URL: #32275 Refs: #28710 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: James M Snell <[email protected]> Backport-PR-URL: #32372
PR-URL: #32277 Refs: #28710 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: James M Snell <[email protected]>
PR-URL: #32277 Refs: #28710 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: James M Snell <[email protected]>
PR-URL: #32276 Refs: #28710 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]>
PR-URL: #32277 Refs: #28710 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: James M Snell <[email protected]>
I believe the events allowed to be emitted after
error
should be rather limited.Based on the test suite I've found the following exceptions:
exit
,disconnect
andclose
, should be ok.unpipe
, maybe ok?I've fixed some:
#28709
#28708
#28711
Then there are a lot of possible cases that might need fixing:
https://gist.github.com/ronag/b5728ae5db305abaff9955da5b47a5c9
I've found these by updating
EventEmitter.prototype.emit
with:Is this worth to further look into?
The text was updated successfully, but these errors were encountered: