-
-
Notifications
You must be signed in to change notification settings - Fork 220
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
api: iteration should stop after I/O error
This commit changes the behavior of the CSV reader (and its iterators) to stop when an I/O error from the underlying reader is encountered. When reading and parsing a record fails, correct behavior in most cases to keep on trying to read and parse the next record. That behavior remains the same after this commit. However when the Error is caused by failing to read from the underlying reader, the next read would almost always fail with the exact same error. In that scenario, reading from the underlying reader should not be attempted when trying to extract the next record, as this may lead to infinite loops. Instead, the reader will behave in the same way as if an end-of-file had been reached. Fixes #207
- Loading branch information
Showing
2 changed files
with
63 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters