mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-07-21 15:09:48 +08:00
修改异常包装策略:运行时异常不包装,只包装非运行时异常
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package cn.hutool.db.sql;
|
||||
|
||||
import cn.hutool.core.collection.ArrayIter;
|
||||
import cn.hutool.core.exceptions.ExceptionUtil;
|
||||
import cn.hutool.core.lang.func.Func1;
|
||||
import cn.hutool.db.DbUtil;
|
||||
import cn.hutool.db.StatementUtil;
|
||||
@@ -299,7 +300,7 @@ public class SqlExecutor {
|
||||
if(e instanceof SQLException){
|
||||
throw (SQLException) e;
|
||||
}
|
||||
throw new RuntimeException(e);
|
||||
throw ExceptionUtil.wrapRuntime(e);
|
||||
} finally {
|
||||
DbUtil.close(ps);
|
||||
}
|
||||
|
Reference in New Issue
Block a user