diff --git a/CHANGELOG.md b/CHANGELOG.md index aee17cb55..ef7fb607c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -24,6 +24,7 @@ * 【cron 】 Scheduler增加setThreadExecutor(issue#I47A6N@Gitee) * 【core 】 CharsetDetector增加detect重载,支持自定义缓存大小(issue#I478E5@Gitee) * 【core 】 增加PartitionIter(pr#402@Gitee) +* 【all 】 增加异常爬栈开关(pr#403@Gitee) ### 🐞Bug修复 * 【core 】 修复MapUtil.sort比较器不一致返回原map的问题(issue#I46AQJ@Gitee) diff --git a/hutool-core/src/main/java/cn/hutool/core/exceptions/DependencyException.java b/hutool-core/src/main/java/cn/hutool/core/exceptions/DependencyException.java index 5ca777c17..b2040a237 100644 --- a/hutool-core/src/main/java/cn/hutool/core/exceptions/DependencyException.java +++ b/hutool-core/src/main/java/cn/hutool/core/exceptions/DependencyException.java @@ -27,8 +27,8 @@ 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(String message, Throwable throwable, boolean enableSuppression, boolean writableStackTrace) { + super(message, throwable, enableSuppression, writableStackTrace); } public DependencyException(Throwable throwable, String messageTemplate, Object... params) { diff --git a/hutool-core/src/main/java/cn/hutool/core/exceptions/NotInitedException.java b/hutool-core/src/main/java/cn/hutool/core/exceptions/NotInitedException.java index 08002460d..bbe578bf3 100644 --- a/hutool-core/src/main/java/cn/hutool/core/exceptions/NotInitedException.java +++ b/hutool-core/src/main/java/cn/hutool/core/exceptions/NotInitedException.java @@ -26,8 +26,8 @@ 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(String message, Throwable throwable, boolean enableSuppression, boolean writableStackTrace) { + super(message, throwable, enableSuppression, writableStackTrace); } public NotInitedException(Throwable throwable, String messageTemplate, Object... params) { diff --git a/hutool-core/src/main/java/cn/hutool/core/exceptions/StatefulException.java b/hutool-core/src/main/java/cn/hutool/core/exceptions/StatefulException.java index cdd353023..f560dfbfc 100644 --- a/hutool-core/src/main/java/cn/hutool/core/exceptions/StatefulException.java +++ b/hutool-core/src/main/java/cn/hutool/core/exceptions/StatefulException.java @@ -6,7 +6,6 @@ import cn.hutool.core.util.StrUtil; * 带有状态码的异常 * * @author xiaoleilu - * */ public class StatefulException extends RuntimeException { private static final long serialVersionUID = 6057602589533840889L; @@ -33,8 +32,8 @@ 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(String message, Throwable throwable, boolean enableSuppression, boolean writableStackTrace) { + super(message, throwable, enableSuppression, writableStackTrace); } public StatefulException(int status, String msg) { diff --git a/hutool-core/src/main/java/cn/hutool/core/exceptions/UtilException.java b/hutool-core/src/main/java/cn/hutool/core/exceptions/UtilException.java index f5bcf6733..3024aedb2 100644 --- a/hutool-core/src/main/java/cn/hutool/core/exceptions/UtilException.java +++ b/hutool-core/src/main/java/cn/hutool/core/exceptions/UtilException.java @@ -4,9 +4,10 @@ import cn.hutool.core.util.StrUtil; /** * 工具类异常 + * * @author xiaoleilu */ -public class UtilException extends RuntimeException{ +public class UtilException extends RuntimeException { private static final long serialVersionUID = 8247610319171014183L; public UtilException(Throwable e) { @@ -25,8 +26,8 @@ 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(String message, Throwable throwable, boolean enableSuppression, boolean writableStackTrace) { + super(message, throwable, enableSuppression, writableStackTrace); } public UtilException(Throwable throwable, String messageTemplate, Object... params) { diff --git a/hutool-cron/src/main/java/cn/hutool/cron/CronException.java b/hutool-cron/src/main/java/cn/hutool/cron/CronException.java index 0f2a7d5d1..8e45db950 100644 --- a/hutool-cron/src/main/java/cn/hutool/cron/CronException.java +++ b/hutool-cron/src/main/java/cn/hutool/cron/CronException.java @@ -4,23 +4,28 @@ import cn.hutool.core.util.StrUtil; /** * 定时任务异常 + * * @author xiaoleilu */ -public class CronException extends RuntimeException{ +public class CronException extends RuntimeException { private static final long serialVersionUID = 1L; public CronException(Throwable e) { super(e.getMessage(), e); } - + public CronException(String message) { super(message); } - + public CronException(String messageTemplate, Object... params) { super(StrUtil.format(messageTemplate, params)); } - + + public CronException(String message, Throwable throwable, boolean enableSuppression, boolean writableStackTrace) { + super(message, throwable, enableSuppression, writableStackTrace); + } + public CronException(Throwable throwable, String messageTemplate, Object... params) { super(StrUtil.format(messageTemplate, params), throwable); } diff --git a/hutool-crypto/src/main/java/cn/hutool/crypto/CryptoException.java b/hutool-crypto/src/main/java/cn/hutool/crypto/CryptoException.java index 7de796ae8..5b2092eda 100644 --- a/hutool-crypto/src/main/java/cn/hutool/crypto/CryptoException.java +++ b/hutool-crypto/src/main/java/cn/hutool/crypto/CryptoException.java @@ -27,6 +27,10 @@ public class CryptoException extends RuntimeException { super(message, throwable); } + public CryptoException(String message, Throwable throwable, boolean enableSuppression, boolean writableStackTrace) { + super(message, throwable, enableSuppression, writableStackTrace); + } + public CryptoException(Throwable throwable, String messageTemplate, Object... params) { super(StrUtil.format(messageTemplate, params), throwable); } diff --git a/hutool-db/src/main/java/cn/hutool/db/DbRuntimeException.java b/hutool-db/src/main/java/cn/hutool/db/DbRuntimeException.java index 3dbeecb1e..085b1b86e 100644 --- a/hutool-db/src/main/java/cn/hutool/db/DbRuntimeException.java +++ b/hutool-db/src/main/java/cn/hutool/db/DbRuntimeException.java @@ -13,19 +13,23 @@ public class DbRuntimeException extends RuntimeException{ public DbRuntimeException(Throwable e) { super(ExceptionUtil.getMessage(e), e); } - + public DbRuntimeException(String message) { super(message); } - + public DbRuntimeException(String messageTemplate, Object... params) { super(StrUtil.format(messageTemplate, params)); } - + public DbRuntimeException(String message, Throwable throwable) { super(message, throwable); } - + + public DbRuntimeException(String message, Throwable throwable, boolean enableSuppression, boolean writableStackTrace) { + super(message, throwable, enableSuppression, writableStackTrace); + } + public DbRuntimeException(Throwable throwable, String messageTemplate, Object... params) { super(StrUtil.format(messageTemplate, params), throwable); } diff --git a/hutool-extra/src/main/java/cn/hutool/extra/compress/CompressException.java b/hutool-extra/src/main/java/cn/hutool/extra/compress/CompressException.java index 0b90d47b7..a3691ca5b 100644 --- a/hutool-extra/src/main/java/cn/hutool/extra/compress/CompressException.java +++ b/hutool-extra/src/main/java/cn/hutool/extra/compress/CompressException.java @@ -5,7 +5,7 @@ import cn.hutool.core.util.StrUtil; /** * 压缩解压异常语言异常 - * + * * @author Looly */ public class CompressException extends RuntimeException { @@ -27,6 +27,10 @@ public class CompressException extends RuntimeException { super(message, throwable); } + public CompressException(String message, Throwable throwable, boolean enableSuppression, boolean writableStackTrace) { + super(message, throwable, enableSuppression, writableStackTrace); + } + public CompressException(Throwable throwable, String messageTemplate, Object... params) { super(StrUtil.format(messageTemplate, params), throwable); } diff --git a/hutool-extra/src/main/java/cn/hutool/extra/expression/ExpressionException.java b/hutool-extra/src/main/java/cn/hutool/extra/expression/ExpressionException.java index 19591aab9..f59ac433e 100644 --- a/hutool-extra/src/main/java/cn/hutool/extra/expression/ExpressionException.java +++ b/hutool-extra/src/main/java/cn/hutool/extra/expression/ExpressionException.java @@ -5,7 +5,7 @@ import cn.hutool.core.util.StrUtil; /** * 表达式语言异常 - * + * * @author Looly */ public class ExpressionException extends RuntimeException { @@ -27,6 +27,10 @@ public class ExpressionException extends RuntimeException { super(message, throwable); } + public ExpressionException(String message, Throwable throwable, boolean enableSuppression, boolean writableStackTrace) { + super(message, throwable, enableSuppression, writableStackTrace); + } + public ExpressionException(Throwable throwable, String messageTemplate, Object... params) { super(StrUtil.format(messageTemplate, params), throwable); } diff --git a/hutool-extra/src/main/java/cn/hutool/extra/ftp/FtpException.java b/hutool-extra/src/main/java/cn/hutool/extra/ftp/FtpException.java index b95038db2..f35dfc769 100644 --- a/hutool-extra/src/main/java/cn/hutool/extra/ftp/FtpException.java +++ b/hutool-extra/src/main/java/cn/hutool/extra/ftp/FtpException.java @@ -5,7 +5,7 @@ import cn.hutool.core.util.StrUtil; /** * Ftp异常 - * + * * @author xiaoleilu */ public class FtpException extends RuntimeException { @@ -27,6 +27,10 @@ public class FtpException extends RuntimeException { super(message, throwable); } + public FtpException(String message, Throwable throwable, boolean enableSuppression, boolean writableStackTrace) { + super(message, throwable, enableSuppression, writableStackTrace); + } + public FtpException(Throwable throwable, String messageTemplate, Object... params) { super(StrUtil.format(messageTemplate, params), throwable); } diff --git a/hutool-extra/src/main/java/cn/hutool/extra/mail/MailException.java b/hutool-extra/src/main/java/cn/hutool/extra/mail/MailException.java index c7d9471fc..735a712ea 100644 --- a/hutool-extra/src/main/java/cn/hutool/extra/mail/MailException.java +++ b/hutool-extra/src/main/java/cn/hutool/extra/mail/MailException.java @@ -13,19 +13,23 @@ public class MailException extends RuntimeException{ public MailException(Throwable e) { super(ExceptionUtil.getMessage(e), e); } - + public MailException(String message) { super(message); } - + public MailException(String messageTemplate, Object... params) { super(StrUtil.format(messageTemplate, params)); } - + public MailException(String message, Throwable throwable) { super(message, throwable); } - + + public MailException(String message, Throwable throwable, boolean enableSuppression, boolean writableStackTrace) { + super(message, throwable, enableSuppression, writableStackTrace); + } + public MailException(Throwable throwable, String messageTemplate, Object... params) { super(StrUtil.format(messageTemplate, params), throwable); } diff --git a/hutool-extra/src/main/java/cn/hutool/extra/pinyin/PinyinException.java b/hutool-extra/src/main/java/cn/hutool/extra/pinyin/PinyinException.java index af2facb32..7f2978ae3 100644 --- a/hutool-extra/src/main/java/cn/hutool/extra/pinyin/PinyinException.java +++ b/hutool-extra/src/main/java/cn/hutool/extra/pinyin/PinyinException.java @@ -5,7 +5,7 @@ import cn.hutool.core.util.StrUtil; /** * 模板异常 - * + * * @author xiaoleilu */ public class PinyinException extends RuntimeException { @@ -27,6 +27,10 @@ public class PinyinException extends RuntimeException { super(message, throwable); } + public PinyinException(String message, Throwable throwable, boolean enableSuppression, boolean writableStackTrace) { + super(message, throwable, enableSuppression, writableStackTrace); + } + public PinyinException(Throwable throwable, String messageTemplate, Object... params) { super(StrUtil.format(messageTemplate, params), throwable); } diff --git a/hutool-extra/src/main/java/cn/hutool/extra/qrcode/QrCodeException.java b/hutool-extra/src/main/java/cn/hutool/extra/qrcode/QrCodeException.java index f959b0099..47bcd2761 100644 --- a/hutool-extra/src/main/java/cn/hutool/extra/qrcode/QrCodeException.java +++ b/hutool-extra/src/main/java/cn/hutool/extra/qrcode/QrCodeException.java @@ -5,7 +5,7 @@ import cn.hutool.core.util.StrUtil; /** * Qrcode异常 - * + * * @author xiaoleilu */ public class QrCodeException extends RuntimeException { @@ -27,6 +27,10 @@ public class QrCodeException extends RuntimeException { super(message, throwable); } + public QrCodeException(String message, Throwable throwable, boolean enableSuppression, boolean writableStackTrace) { + super(message, throwable, enableSuppression, writableStackTrace); + } + public QrCodeException(Throwable throwable, String messageTemplate, Object... params) { super(StrUtil.format(messageTemplate, params), throwable); } diff --git a/hutool-extra/src/main/java/cn/hutool/extra/ssh/JschRuntimeException.java b/hutool-extra/src/main/java/cn/hutool/extra/ssh/JschRuntimeException.java index 39094c001..264c8c569 100644 --- a/hutool-extra/src/main/java/cn/hutool/extra/ssh/JschRuntimeException.java +++ b/hutool-extra/src/main/java/cn/hutool/extra/ssh/JschRuntimeException.java @@ -13,19 +13,23 @@ public class JschRuntimeException extends RuntimeException{ public JschRuntimeException(Throwable e) { super(ExceptionUtil.getMessage(e), e); } - + public JschRuntimeException(String message) { super(message); } - + public JschRuntimeException(String messageTemplate, Object... params) { super(StrUtil.format(messageTemplate, params)); } - + public JschRuntimeException(String message, Throwable throwable) { super(message, throwable); } - + + public JschRuntimeException(String message, Throwable throwable, boolean enableSuppression, boolean writableStackTrace) { + super(message, throwable, enableSuppression, writableStackTrace); + } + public JschRuntimeException(Throwable throwable, String messageTemplate, Object... params) { super(StrUtil.format(messageTemplate, params), throwable); } diff --git a/hutool-extra/src/main/java/cn/hutool/extra/template/TemplateException.java b/hutool-extra/src/main/java/cn/hutool/extra/template/TemplateException.java index c618308c6..d7811e4c5 100644 --- a/hutool-extra/src/main/java/cn/hutool/extra/template/TemplateException.java +++ b/hutool-extra/src/main/java/cn/hutool/extra/template/TemplateException.java @@ -5,7 +5,7 @@ import cn.hutool.core.util.StrUtil; /** * 模板异常 - * + * * @author xiaoleilu */ public class TemplateException extends RuntimeException { @@ -27,6 +27,10 @@ public class TemplateException extends RuntimeException { super(message, throwable); } + public TemplateException(String message, Throwable throwable, boolean enableSuppression, boolean writableStackTrace) { + super(message, throwable, enableSuppression, writableStackTrace); + } + public TemplateException(Throwable throwable, String messageTemplate, Object... params) { super(StrUtil.format(messageTemplate, params), throwable); } diff --git a/hutool-extra/src/main/java/cn/hutool/extra/tokenizer/TokenizerException.java b/hutool-extra/src/main/java/cn/hutool/extra/tokenizer/TokenizerException.java index 20cae8754..959eee9d7 100644 --- a/hutool-extra/src/main/java/cn/hutool/extra/tokenizer/TokenizerException.java +++ b/hutool-extra/src/main/java/cn/hutool/extra/tokenizer/TokenizerException.java @@ -5,7 +5,7 @@ import cn.hutool.core.util.StrUtil; /** * 分词异常 - * + * * @author Looly */ public class TokenizerException extends RuntimeException { @@ -27,6 +27,10 @@ public class TokenizerException extends RuntimeException { super(message, throwable); } + public TokenizerException(String message, Throwable throwable, boolean enableSuppression, boolean writableStackTrace) { + super(message, throwable, enableSuppression, writableStackTrace); + } + public TokenizerException(Throwable throwable, String messageTemplate, Object... params) { super(StrUtil.format(messageTemplate, params), throwable); } diff --git a/hutool-http/src/main/java/cn/hutool/http/HttpException.java b/hutool-http/src/main/java/cn/hutool/http/HttpException.java index 324a496cd..bd24d2a56 100644 --- a/hutool-http/src/main/java/cn/hutool/http/HttpException.java +++ b/hutool-http/src/main/java/cn/hutool/http/HttpException.java @@ -3,28 +3,33 @@ package cn.hutool.http; import cn.hutool.core.util.StrUtil; /** - *HTTP异常 + * HTTP异常 + * * @author xiaoleilu */ -public class HttpException extends RuntimeException{ +public class HttpException extends RuntimeException { private static final long serialVersionUID = 8247610319171014183L; public HttpException(Throwable e) { super(e.getMessage(), e); } - + public HttpException(String message) { super(message); } - + public HttpException(String messageTemplate, Object... params) { super(StrUtil.format(messageTemplate, params)); } - + public HttpException(String message, Throwable throwable) { super(message, throwable); } - + + public HttpException(String message, Throwable throwable, boolean enableSuppression, boolean writableStackTrace) { + super(message, throwable, enableSuppression, writableStackTrace); + } + public HttpException(Throwable throwable, String messageTemplate, Object... params) { super(StrUtil.format(messageTemplate, params), throwable); } diff --git a/hutool-json/src/main/java/cn/hutool/json/JSONException.java b/hutool-json/src/main/java/cn/hutool/json/JSONException.java index e063fcc76..d2f4d035c 100644 --- a/hutool-json/src/main/java/cn/hutool/json/JSONException.java +++ b/hutool-json/src/main/java/cn/hutool/json/JSONException.java @@ -11,7 +11,7 @@ import cn.hutool.core.util.StrUtil; */ public class JSONException extends RuntimeException { private static final long serialVersionUID = 0; - + public JSONException(Throwable e) { super(ExceptionUtil.getMessage(e), e); } @@ -19,7 +19,7 @@ public class JSONException extends RuntimeException { public JSONException(String message) { super(message); } - + public JSONException(String messageTemplate, Object... params) { super(StrUtil.format(messageTemplate, params)); } @@ -28,6 +28,10 @@ public class JSONException extends RuntimeException { super(message, cause); } + public JSONException(String message, Throwable throwable, boolean enableSuppression, boolean writableStackTrace) { + super(message, throwable, enableSuppression, writableStackTrace); + } + public JSONException(Throwable throwable, String messageTemplate, Object... params) { super(StrUtil.format(messageTemplate, params), throwable); } diff --git a/hutool-jwt/src/main/java/cn/hutool/jwt/JWTException.java b/hutool-jwt/src/main/java/cn/hutool/jwt/JWTException.java index b2fd6aece..4cd488f82 100644 --- a/hutool-jwt/src/main/java/cn/hutool/jwt/JWTException.java +++ b/hutool-jwt/src/main/java/cn/hutool/jwt/JWTException.java @@ -28,6 +28,10 @@ public class JWTException extends RuntimeException { super(message, cause); } + public JWTException(String message, Throwable throwable, boolean enableSuppression, boolean writableStackTrace) { + super(message, throwable, enableSuppression, writableStackTrace); + } + public JWTException(Throwable throwable, String messageTemplate, Object... params) { super(StrUtil.format(messageTemplate, params), throwable); } diff --git a/hutool-poi/src/main/java/cn/hutool/poi/exceptions/POIException.java b/hutool-poi/src/main/java/cn/hutool/poi/exceptions/POIException.java index a551a98c3..95ec8ad67 100644 --- a/hutool-poi/src/main/java/cn/hutool/poi/exceptions/POIException.java +++ b/hutool-poi/src/main/java/cn/hutool/poi/exceptions/POIException.java @@ -5,27 +5,32 @@ import cn.hutool.core.util.StrUtil; /** * POI异常 + * * @author xiaoleilu */ -public class POIException extends RuntimeException{ +public class POIException extends RuntimeException { private static final long serialVersionUID = 2711633732613506552L; public POIException(Throwable e) { super(ExceptionUtil.getMessage(e), e); } - + public POIException(String message) { super(message); } - + public POIException(String messageTemplate, Object... params) { super(StrUtil.format(messageTemplate, params)); } - + public POIException(String message, Throwable throwable) { super(message, throwable); } - + + public POIException(String message, Throwable throwable, boolean enableSuppression, boolean writableStackTrace) { + super(message, throwable, enableSuppression, writableStackTrace); + } + public POIException(Throwable throwable, String messageTemplate, Object... params) { super(StrUtil.format(messageTemplate, params), throwable); } diff --git a/hutool-script/src/main/java/cn/hutool/script/ScriptRuntimeException.java b/hutool-script/src/main/java/cn/hutool/script/ScriptRuntimeException.java index 84f2ede94..c609ebbf7 100644 --- a/hutool-script/src/main/java/cn/hutool/script/ScriptRuntimeException.java +++ b/hutool-script/src/main/java/cn/hutool/script/ScriptRuntimeException.java @@ -7,7 +7,7 @@ import javax.script.ScriptException; /** * 脚本运行时异常 - * + * * @author xiaoleilu */ public class ScriptRuntimeException extends RuntimeException { @@ -33,6 +33,10 @@ public class ScriptRuntimeException extends RuntimeException { super(message, throwable); } + public ScriptRuntimeException(String message, Throwable throwable, boolean enableSuppression, boolean writableStackTrace) { + super(message, throwable, enableSuppression, writableStackTrace); + } + public ScriptRuntimeException(Throwable throwable, String messageTemplate, Object... params) { super(StrUtil.format(messageTemplate, params), throwable); } @@ -40,10 +44,8 @@ public class ScriptRuntimeException extends RuntimeException { /** * Creates a ScriptException with message, filename and linenumber to be used in error messages. * - * @param message The string to use in the message - * - * @param fileName The file or resource name describing the location of a script error causing the ScriptException to be thrown. - * + * @param message The string to use in the message + * @param fileName The file or resource name describing the location of a script error causing the ScriptException to be thrown. * @param lineNumber A line number describing the location of a script error causing the ScriptException to be thrown. */ public ScriptRuntimeException(String message, String fileName, int lineNumber) { @@ -54,10 +56,10 @@ public class ScriptRuntimeException extends RuntimeException { /** * ScriptException constructor specifying message, filename, line number and column number. - * - * @param message The message. - * @param fileName The filename - * @param lineNumber the line number. + * + * @param message The message. + * @param fileName The filename + * @param lineNumber the line number. * @param columnNumber the column number. */ public ScriptRuntimeException(String message, String fileName, int lineNumber, int columnNumber) { @@ -66,7 +68,7 @@ public class ScriptRuntimeException extends RuntimeException { this.lineNumber = lineNumber; this.columnNumber = columnNumber; } - + public ScriptRuntimeException(ScriptException e) { super(e); this.fileName = e.getFileName(); @@ -76,7 +78,7 @@ public class ScriptRuntimeException extends RuntimeException { /** * Returns a message containing the String passed to a constructor as well as line and column numbers and filename if any of these are known. - * + * * @return The error message. */ @Override @@ -98,7 +100,7 @@ public class ScriptRuntimeException extends RuntimeException { /** * Get the line number on which an error occurred. - * + * * @return The line number. Returns -1 if a line number is unavailable. */ public int getLineNumber() { @@ -107,7 +109,7 @@ public class ScriptRuntimeException extends RuntimeException { /** * Get the column number on which an error occurred. - * + * * @return The column number. Returns -1 if a column number is unavailable. */ public int getColumnNumber() { @@ -116,9 +118,9 @@ public class ScriptRuntimeException extends RuntimeException { /** * Get the source of the script causing the error. - * + * * @return The file name of the script or some other string describing the script source. May return some implementation-defined string such as <unknown> if a description of the - * source is unavailable. + * source is unavailable. */ public String getFileName() { return fileName; diff --git a/hutool-setting/src/main/java/cn/hutool/setting/SettingRuntimeException.java b/hutool-setting/src/main/java/cn/hutool/setting/SettingRuntimeException.java index 39ed8486a..29d295431 100644 --- a/hutool-setting/src/main/java/cn/hutool/setting/SettingRuntimeException.java +++ b/hutool-setting/src/main/java/cn/hutool/setting/SettingRuntimeException.java @@ -4,27 +4,32 @@ import cn.hutool.core.util.StrUtil; /** * 设置异常 + * * @author xiaoleilu */ -public class SettingRuntimeException extends RuntimeException{ +public class SettingRuntimeException extends RuntimeException { private static final long serialVersionUID = 7941096116780378387L; public SettingRuntimeException(Throwable e) { super(e); } - + public SettingRuntimeException(String message) { super(message); } - + public SettingRuntimeException(String messageTemplate, Object... params) { super(StrUtil.format(messageTemplate, params)); } - + public SettingRuntimeException(String message, Throwable throwable) { super(message, throwable); } - + + public SettingRuntimeException(String message, Throwable throwable, boolean enableSuppression, boolean writableStackTrace) { + super(message, throwable, enableSuppression, writableStackTrace); + } + public SettingRuntimeException(Throwable throwable, String messageTemplate, Object... params) { super(StrUtil.format(messageTemplate, params), throwable); } diff --git a/hutool-socket/src/main/java/cn/hutool/socket/SocketRuntimeException.java b/hutool-socket/src/main/java/cn/hutool/socket/SocketRuntimeException.java index 6f665f353..813fa20b1 100644 --- a/hutool-socket/src/main/java/cn/hutool/socket/SocketRuntimeException.java +++ b/hutool-socket/src/main/java/cn/hutool/socket/SocketRuntimeException.java @@ -5,7 +5,7 @@ import cn.hutool.core.util.StrUtil; /** * Socket异常 - * + * * @author xiaoleilu */ public class SocketRuntimeException extends RuntimeException { @@ -27,6 +27,10 @@ public class SocketRuntimeException extends RuntimeException { super(message, throwable); } + public SocketRuntimeException(String message, Throwable throwable, boolean enableSuppression, boolean writableStackTrace) { + super(message, throwable, enableSuppression, writableStackTrace); + } + public SocketRuntimeException(Throwable throwable, String messageTemplate, Object... params) { super(StrUtil.format(messageTemplate, params), throwable); }