Emit a proper error object when an error arises#79
Emit a proper error object when an error arises#79bitcrumb wants to merge 1 commit intobalthazar:masterfrom inthepocket:fix-unspecified-error-event
Conversation
|
Sorry, I was a tad too fast. Seems that there is already a PR that fixes this: |
|
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 🙂 |
|
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. |
This fixes an issue reported here: #45