Skip to content

Emit a proper error object when an error arises #79

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

Closed
wants to merge 1 commit into from
Closed

Emit a proper error object when an error arises #79

wants to merge 1 commit into from

Conversation

bitcrumb
Copy link

This fixes an issue reported here: #45

@bitcrumb bitcrumb mentioned this pull request Apr 23, 2019
@bitcrumb bitcrumb closed this Apr 23, 2019
@bitcrumb bitcrumb deleted the fix-unspecified-error-event branch April 23, 2019 12:43
@bitcrumb
Copy link
Author

Sorry, I was a tad too fast. Seems that there is already a PR that fixes this:
#69

@balthazar
Copy link
Owner

As #69 had quite a few things that needed to be addressed before being merged, it's seems better to reopen this PR so I can draft a version with this fix quickly 🙂

@bitcrumb
Copy link
Author

bitcrumb commented Apr 23, 2019

Actually, this PR probably doesn't fix the issue and was a result of my limited understanding of the EventEmitter code at the time (and me being in a hurry 😅). I don't think there's a real difference in emitting a string or Error object since both will eventually throw (see: https://github.com/nodejs/node/blob/908292cf1f551c614a733d858528ffb13fb3a524/lib/events.js#L173 & https://github.com/nodejs/node/blob/908292cf1f551c614a733d858528ffb13fb3a524/lib/events.js#L187).

I tried to explain what the real issue is in #45.

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