elharo commented on code in PR #347:
URL: https://github.com/apache/commons-csv/pull/347#discussion_r1311531227


##########
src/main/java/org/apache/commons/csv/CSVParser.java:
##########
@@ -438,6 +440,44 @@ public CSVParser(final Reader reader, final CSVFormat 
format, final long charact
         this.recordNumber = recordNumber - 1;
     }
 
+    /**
+     * Return the parsed CSV content of current reading line up until this 
method is called.

Review Comment:
   "reading line" is awkward. Consider rephrasing



##########
src/main/java/org/apache/commons/csv/CSVParser.java:
##########
@@ -438,6 +440,44 @@ public CSVParser(final Reader reader, final CSVFormat 
format, final long charact
         this.recordNumber = recordNumber - 1;
     }
 
+    /**
+     * Return the parsed CSV content of current reading line up until this 
method is called.
+     * <p>
+     * Maximum parsed token length set by the 'maxParsedTokenCount' is 
considered during the construction of return string.
+     * </p>
+     * <p>
+     * Example:
+     * </p>
+     * </p>
+     * If currently reading CSV record row contains following data and 
'maxParsedTokenCount' is set to 5 and current reading position is col7
+     * </p>
+     * <pre>
+     * col1, col2, col3, col4, col5, col6, col7
+     * </pre>
+     * <p>
+     * then this would return following

Review Comment:
   would return --> returns



##########
src/main/java/org/apache/commons/csv/CSVParser.java:
##########
@@ -765,7 +805,15 @@ 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 tying to 
parse the CSV content. Issue in line: "

Review Comment:
   tying to parse --> parsing



-- 
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