emit 'error' when write to WriteStream failed#167
emit 'error' when write to WriteStream failed#167fhinkel wants to merge 3 commits intonode-formidable:masterfrom
Conversation
|
Hey is there a reason for this not being merged? |
|
2 reasons: 1. lacks test case. 2. Wrapping the error in a new error is incorrect. |
|
i believe this has been fixed in #195 |
|
Nope, this one is not fixed yet |
|
When will you merge fc41a83 to master? |
|
I agree that this is an issue that needs to be addressed, since I cannot find any way to capture an unhandled exception from the stream writer. This pull request is definitely on the right track, but it's flawed. Once the error is raised, the parser's onEnd event is called which sets ended === true. If ended is set to true before _error() is called the error is eaten. Something needs to be done to be able to bubble the error past where ended === true eats it. Once that happens, I think the fix will do the job. |
|
It happens, for example, when the disk is full. This should definitely be merged. At least commit c3e6ca6. |
We tried to write to a non-existing directory, which resulted in an uncaught exception. I added an error handler for WriteStream, so 'error' is emitted when writing the file failed.