garydgregory commented on code in PR #347:
URL: https://github.com/apache/commons-csv/pull/347#discussion_r1311663575
##########
src/main/java/org/apache/commons/csv/CSVParser.java:
##########
@@ -765,7 +805,14 @@ CSVRecord nextRecord() throws IOException {
final long startCharPosition = lexer.getCharacterPosition() +
this.characterOffset;
do {
this.reusableToken.reset();
- this.lexer.nextToken(this.reusableToken);
+ // https://issues.apache.org/jira/browse/CSV-147
+ try {
+ this.lexer.nextToken(this.reusableToken);
+ } catch (IOException ioe) {
+ String errorMessage = "An exception occurred while parsing the
CSV content. Issue in line: "
+ + this.lexer.getCurrentLineNumber() + ", position: " +
this.lexer.getCharacterPosition();
Review Comment:
Simply message: "Exception parsing at line N, column C."
##########
src/main/java/org/apache/commons/csv/CSVParser.java:
##########
@@ -765,7 +805,14 @@ CSVRecord nextRecord() throws IOException {
final long startCharPosition = lexer.getCharacterPosition() +
this.characterOffset;
do {
this.reusableToken.reset();
- this.lexer.nextToken(this.reusableToken);
+ // https://issues.apache.org/jira/browse/CSV-147
Review Comment:
No need for this comment IMO.
--
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]