garydgregory commented on code in PR #348:
URL: https://github.com/apache/commons-csv/pull/348#discussion_r1310162041


##########
src/main/java/org/apache/commons/csv/CSVParser.java:
##########
@@ -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);

Review Comment:
   "Error" has a specific meaning in Java, and we did _not_ catch a 
`java.lang.Error` here. So saying "Exception reading next record..." is more 
accurate than "Error...", so then the difference is whether the sentence start 
with "Exception ..." vs. "IOException..." (or a subclass), so the difference is 
not interesting IMO. Or, we could say `"CSVParser#nextRecord(): " + e` where 
the (maybe dubious) benefit is that it is a touch more language-neutral.
   
   Thoughts?
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to