Skip to content

Commit

Permalink
0002147: Add validation and better error message if the parsed tokens…
Browse files Browse the repository at this point in the history
… doesn't match the column count of the last parsed table
  • Loading branch information
chenson42 committed Jan 20, 2015
1 parent 65f9105 commit b598ec5
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -172,7 +172,7 @@ public Object readNext() {
int columnCount = context.getLastParsedTable().getColumnCount();
if (tokens.length <= columnCount) {
String msg = String.format("Invalid state while parsing csv data. "
+ "The number of columns reported for table '%s' don't match up with the token data: {}",
+ "The number of columns reported for table '%s' don't match up with the token data: %s",
context.getLastParsedTable().getFullyQualifiedTableName(), ArrayUtils.toString(tokens));
throw new IllegalStateException(msg);
}
Expand Down

0 comments on commit b598ec5

Please sign in to comment.