add constructor

This commit is contained in:
Looly 2021-08-26 23:40:28 +08:00
parent c0510a4c66
commit d66efef873
24 changed files with 146 additions and 67 deletions

View File

@ -24,6 +24,7 @@
* 【cron 】 Scheduler增加setThreadExecutorissue#I47A6N@Gitee
* 【core 】 CharsetDetector增加detect重载支持自定义缓存大小issue#I478E5@Gitee
* 【core 】 增加PartitionIterpr#402@Gitee
* 【all 】 增加异常爬栈开关pr#403@Gitee
### 🐞Bug修复
* 【core 】 修复MapUtil.sort比较器不一致返回原map的问题issue#I46AQJ@Gitee

View File

@ -6,7 +6,6 @@ import cn.hutool.core.util.StrUtil;
* 带有状态码的异常
*
* @author xiaoleilu
*
*/
public class StatefulException extends RuntimeException {
private static final long serialVersionUID = 6057602589533840889L;

View File

@ -4,6 +4,7 @@ import cn.hutool.core.util.StrUtil;
/**
* 工具类异常
*
* @author xiaoleilu
*/
public class UtilException extends RuntimeException {

View File

@ -4,6 +4,7 @@ import cn.hutool.core.util.StrUtil;
/**
* 定时任务异常
*
* @author xiaoleilu
*/
public class CronException extends RuntimeException {
@ -21,6 +22,10 @@ public class CronException extends RuntimeException{
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);
}

View File

@ -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);
}

View File

@ -26,6 +26,10 @@ public class DbRuntimeException extends RuntimeException{
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);
}

View File

@ -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);
}

View File

@ -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);
}

View File

@ -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);
}

View File

@ -26,6 +26,10 @@ public class MailException extends RuntimeException{
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);
}

View File

@ -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);
}

View File

@ -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);
}

View File

@ -26,6 +26,10 @@ public class JschRuntimeException extends RuntimeException{
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);
}

View File

@ -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);
}

View File

@ -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);
}

View File

@ -4,6 +4,7 @@ import cn.hutool.core.util.StrUtil;
/**
* HTTP异常
*
* @author xiaoleilu
*/
public class HttpException extends RuntimeException {
@ -25,6 +26,10 @@ public class HttpException extends RuntimeException{
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);
}

View File

@ -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);
}

View File

@ -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);
}

View File

@ -5,6 +5,7 @@ import cn.hutool.core.util.StrUtil;
/**
* POI异常
*
* @author xiaoleilu
*/
public class POIException extends RuntimeException {
@ -26,6 +27,10 @@ public class POIException extends RuntimeException{
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);
}

View File

@ -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);
}
@ -41,9 +45,7 @@ public class ScriptRuntimeException extends RuntimeException {
* Creates a <code>ScriptException</code> 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 <code>ScriptException</code> to be thrown.
*
* @param lineNumber A line number describing the location of a script error causing the <code>ScriptException</code> to be thrown.
*/
public ScriptRuntimeException(String message, String fileName, int lineNumber) {

View File

@ -4,6 +4,7 @@ import cn.hutool.core.util.StrUtil;
/**
* 设置异常
*
* @author xiaoleilu
*/
public class SettingRuntimeException extends RuntimeException {
@ -25,6 +26,10 @@ public class SettingRuntimeException extends RuntimeException{
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);
}

View File

@ -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);
}