提交 bd36fa54 authored 作者: Thomas Mueller's avatar Thomas Mueller

Issue 246: improved error message for data conversion problems.

上级 83bd4d31
......@@ -152,7 +152,8 @@ public class Column {
return v.convertTo(type);
} catch (DbException e) {
if (e.getErrorCode() == ErrorCode.DATA_CONVERSION_ERROR_1) {
throw DbException.get(ErrorCode.DATA_CONVERSION_ERROR_1, v.getSQL() + " (" + getCreateSQL() + ")");
String target = (table == null ? "" : table.getName() + ": ") + getCreateSQL();
throw DbException.get(ErrorCode.DATA_CONVERSION_ERROR_1, v.getSQL() + " (" + target + ")");
}
throw e;
}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论