Skip to content

Commit 6448b71

Browse files
authored
Merge pull request #140 from xi-mad/main
Add row and column indices to the doConvertToJavaObject method to provide detailed context when an error occurs.
2 parents 83aee6a + dc2854e commit 6448b71

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

fastexcel-core/src/main/java/cn/idev/excel/util/ConverterUtils.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -174,14 +174,14 @@ private static Object doConvertToJavaObject(ReadCellData<?> cellData, Class<?> c
174174
}
175175
if (converter == null) {
176176
throw new ExcelDataConvertException(rowIndex, columnIndex, cellData, contentProperty,
177-
"Converter not found, convert " + cellData.getType() + " to " + clazz.getName());
177+
"Error at row " + rowIndex + ", column " + columnIndex + ": Converter not found, convert " + cellData.getType() + " to " + clazz.getName());
178178
}
179179

180180
try {
181181
return converter.convertToJavaData(new ReadConverterContext<>(cellData, contentProperty, context));
182182
} catch (Exception e) {
183183
throw new ExcelDataConvertException(rowIndex, columnIndex, cellData, contentProperty,
184-
"Convert data " + cellData + " to " + clazz + " error ", e);
184+
"Error at row " + rowIndex + ", column " + columnIndex + ": Convert data " + cellData + " to " + clazz + " error ", e);
185185
}
186186
}
187187
}

0 commit comments

Comments
 (0)