-
Notifications
You must be signed in to change notification settings - Fork 304
Update exception message in CSVRecord#getNextRecord() #348
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
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -147,7 +147,7 @@ private CSVRecord getNextRecord() { | |
| try { | ||
| return CSVParser.this.nextRecord(); | ||
| } catch (final IOException e) { | ||
| throw new UncheckedIOException(e.getClass().getSimpleName() + " reading next record: " + e.toString(), e); | ||
| throw new UncheckedIOException("Error in reading next record: " + e.toString(), e); | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. "Error" has a specific meaning in Java, and we did not catch a Thoughts?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I feel "Exception reading next record" would be more meaningful.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why not just: "Failed to read next record"? |
||
| } | ||
| } | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not just
throw new UncheckedIOException("Error in reading next record", e);? No duplication. Plain and simple.Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might be the intention was to provide the sense of error in the message itself.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's not an
Error... See below.