提交 fa5784cd authored 作者: sylvain-ilm's avatar sylvain-ilm

inline method, as requested

上级 7162ac2a
......@@ -187,7 +187,8 @@ public class DbException extends RuntimeException {
* @return the exception
*/
public static DbException fromUser(String sqlstate, String message) {
return new DbException(getJdbcSQLException(sqlstate, message));
// do not translate as sqlstate is arbitrary : avoid "message not found"
return new DbException(new JdbcSQLException(message, null, sqlstate, 0, null, null));
}
/**
......@@ -356,11 +357,6 @@ public class DbException extends RuntimeException {
return new JdbcSQLException(message, null, sqlstate, errorCode, cause, null);
}
private static JdbcSQLException getJdbcSQLException(String sqlstate, String message) {
// do not translate as sqlstate is arbitrary : avoid "message not found"
return new JdbcSQLException(message, null, sqlstate, 0, null, null);
}
/**
* Convert an exception to an IO exception.
*
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论