You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
I've an on('headers') handler which throws an Error in the event of bad headers, but this seems to cause instant process exit rather than resulting in something that the caller can catch.
Describe the solution you'd like
I'd like to see an example of how to induce a failure in an on() handler which causes parsing to terminate and transmits an exception to the caller, rather than exiting the process. I am a little tired so may have missed something, but AFAICS your extensive code samples just seem to console.log problems or exit. Weirdly I'm pretty sure that elsewhere during row parsing I throw errors which do reach the caller, so maybe this is just an issue with on('headers')?
Describe alternatives you've considered
I noticed in your tests that you use Promise.reject to express failures in some handlers. If that's the official recommended route then I think an example of this in the docs would be helpful.
Additional context
[n/a]
The text was updated successfully, but these errors were encountered:
Parsing or Formatting?
Is your feature request related to a problem? Please describe.
I've an
on('headers')
handler which throws anError
in the event of bad headers, but this seems to cause instant process exit rather than resulting in something that the caller can catch.Describe the solution you'd like
I'd like to see an example of how to induce a failure in an
on()
handler which causes parsing to terminate and transmits an exception to the caller, rather than exiting the process. I am a little tired so may have missed something, but AFAICS your extensive code samples just seem toconsole.log
problems or exit. Weirdly I'm pretty sure that elsewhere during row parsing I throw errors which do reach the caller, so maybe this is just an issue withon('headers')
?Describe alternatives you've considered
I noticed in your tests that you use
Promise.reject
to express failures in some handlers. If that's the official recommended route then I think an example of this in the docs would be helpful.Additional context
[n/a]
The text was updated successfully, but these errors were encountered: