mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-05-09 23:51:34 +08:00
创建异常对象时会调用父类Throwable的fillInStackTrace()方法生成栈追踪信息,这部分对系统性能开销很大。JDk7开始 异常类增加了爬栈开关,这里同样增加构造方法方便根据业务情况自定义是否关闭和打开
This commit is contained in:
parent
ea976bc25b
commit
40a6ffbea0
@ -27,6 +27,10 @@ public class DependencyException extends RuntimeException {
|
||||
super(message, throwable);
|
||||
}
|
||||
|
||||
public DependencyException( String message, Throwable throwable,boolean enableSuppression,boolean writableStackTrace) {
|
||||
super(message, throwable,enableSuppression,writableStackTrace);
|
||||
}
|
||||
|
||||
public DependencyException(Throwable throwable, String messageTemplate, Object... params) {
|
||||
super(StrUtil.format(messageTemplate, params), throwable);
|
||||
}
|
||||
|
@ -26,6 +26,10 @@ public class NotInitedException extends RuntimeException {
|
||||
super(message, throwable);
|
||||
}
|
||||
|
||||
public NotInitedException( String message, Throwable throwable,boolean enableSuppression,boolean writableStackTrace) {
|
||||
super(message, throwable,enableSuppression,writableStackTrace);
|
||||
}
|
||||
|
||||
public NotInitedException(Throwable throwable, String messageTemplate, Object... params) {
|
||||
super(StrUtil.format(messageTemplate, params), throwable);
|
||||
}
|
||||
|
@ -33,6 +33,10 @@ public class StatefulException extends RuntimeException {
|
||||
super(msg, throwable);
|
||||
}
|
||||
|
||||
public StatefulException( String message, Throwable throwable,boolean enableSuppression,boolean writableStackTrace) {
|
||||
super(message, throwable,enableSuppression,writableStackTrace);
|
||||
}
|
||||
|
||||
public StatefulException(int status, String msg) {
|
||||
super(msg);
|
||||
this.status = status;
|
||||
|
@ -25,6 +25,10 @@ public class UtilException extends RuntimeException{
|
||||
super(message, throwable);
|
||||
}
|
||||
|
||||
public UtilException( String message, Throwable throwable,boolean enableSuppression,boolean writableStackTrace) {
|
||||
super(message, throwable,enableSuppression,writableStackTrace);
|
||||
}
|
||||
|
||||
public UtilException(Throwable throwable, String messageTemplate, Object... params) {
|
||||
super(StrUtil.format(messageTemplate, params), throwable);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user