Add more info to table row size errors.

This commit is contained in:
Andrew Raines 2014-01-03 09:22:02 -06:00
parent 106b747a08
commit d657dc49b2
1 changed files with 6 additions and 1 deletions

View File

@ -73,7 +73,12 @@ public class Table {
public Table endRow(boolean check) {
if (check && (currentCells.size() != headers.size())) {
throw new ElasticSearchIllegalArgumentException("mismatch on number of cells in a row compared to header");
StringBuilder s = new StringBuilder();
s.append("mismatch on number of cells ");
s.append(currentCells.size());
s.append(" in a row compared to header ");
s.append(headers.size());
throw new ElasticSearchIllegalArgumentException(s.toString());
}
rows.add(currentCells);
currentCells = null;