mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-05-09 23:51:34 +08:00
add constructor
This commit is contained in:
parent
c0510a4c66
commit
d66efef873
@ -24,6 +24,7 @@
|
|||||||
* 【cron 】 Scheduler增加setThreadExecutor(issue#I47A6N@Gitee)
|
* 【cron 】 Scheduler增加setThreadExecutor(issue#I47A6N@Gitee)
|
||||||
* 【core 】 CharsetDetector增加detect重载,支持自定义缓存大小(issue#I478E5@Gitee)
|
* 【core 】 CharsetDetector增加detect重载,支持自定义缓存大小(issue#I478E5@Gitee)
|
||||||
* 【core 】 增加PartitionIter(pr#402@Gitee)
|
* 【core 】 增加PartitionIter(pr#402@Gitee)
|
||||||
|
* 【all 】 增加异常爬栈开关(pr#403@Gitee)
|
||||||
|
|
||||||
### 🐞Bug修复
|
### 🐞Bug修复
|
||||||
* 【core 】 修复MapUtil.sort比较器不一致返回原map的问题(issue#I46AQJ@Gitee)
|
* 【core 】 修复MapUtil.sort比较器不一致返回原map的问题(issue#I46AQJ@Gitee)
|
||||||
|
@ -6,7 +6,6 @@ import cn.hutool.core.util.StrUtil;
|
|||||||
* 带有状态码的异常
|
* 带有状态码的异常
|
||||||
*
|
*
|
||||||
* @author xiaoleilu
|
* @author xiaoleilu
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
public class StatefulException extends RuntimeException {
|
public class StatefulException extends RuntimeException {
|
||||||
private static final long serialVersionUID = 6057602589533840889L;
|
private static final long serialVersionUID = 6057602589533840889L;
|
||||||
|
@ -4,6 +4,7 @@ import cn.hutool.core.util.StrUtil;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 工具类异常
|
* 工具类异常
|
||||||
|
*
|
||||||
* @author xiaoleilu
|
* @author xiaoleilu
|
||||||
*/
|
*/
|
||||||
public class UtilException extends RuntimeException {
|
public class UtilException extends RuntimeException {
|
||||||
|
@ -4,6 +4,7 @@ import cn.hutool.core.util.StrUtil;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 定时任务异常
|
* 定时任务异常
|
||||||
|
*
|
||||||
* @author xiaoleilu
|
* @author xiaoleilu
|
||||||
*/
|
*/
|
||||||
public class CronException extends RuntimeException {
|
public class CronException extends RuntimeException {
|
||||||
@ -21,6 +22,10 @@ public class CronException extends RuntimeException{
|
|||||||
super(StrUtil.format(messageTemplate, 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) {
|
public CronException(Throwable throwable, String messageTemplate, Object... params) {
|
||||||
super(StrUtil.format(messageTemplate, params), throwable);
|
super(StrUtil.format(messageTemplate, params), throwable);
|
||||||
}
|
}
|
||||||
|
@ -27,6 +27,10 @@ public class CryptoException extends RuntimeException {
|
|||||||
super(message, throwable);
|
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) {
|
public CryptoException(Throwable throwable, String messageTemplate, Object... params) {
|
||||||
super(StrUtil.format(messageTemplate, params), throwable);
|
super(StrUtil.format(messageTemplate, params), throwable);
|
||||||
}
|
}
|
||||||
|
@ -26,6 +26,10 @@ public class DbRuntimeException extends RuntimeException{
|
|||||||
super(message, 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) {
|
public DbRuntimeException(Throwable throwable, String messageTemplate, Object... params) {
|
||||||
super(StrUtil.format(messageTemplate, params), throwable);
|
super(StrUtil.format(messageTemplate, params), throwable);
|
||||||
}
|
}
|
||||||
|
@ -27,6 +27,10 @@ public class CompressException extends RuntimeException {
|
|||||||
super(message, throwable);
|
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) {
|
public CompressException(Throwable throwable, String messageTemplate, Object... params) {
|
||||||
super(StrUtil.format(messageTemplate, params), throwable);
|
super(StrUtil.format(messageTemplate, params), throwable);
|
||||||
}
|
}
|
||||||
|
@ -27,6 +27,10 @@ public class ExpressionException extends RuntimeException {
|
|||||||
super(message, throwable);
|
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) {
|
public ExpressionException(Throwable throwable, String messageTemplate, Object... params) {
|
||||||
super(StrUtil.format(messageTemplate, params), throwable);
|
super(StrUtil.format(messageTemplate, params), throwable);
|
||||||
}
|
}
|
||||||
|
@ -27,6 +27,10 @@ public class FtpException extends RuntimeException {
|
|||||||
super(message, throwable);
|
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) {
|
public FtpException(Throwable throwable, String messageTemplate, Object... params) {
|
||||||
super(StrUtil.format(messageTemplate, params), throwable);
|
super(StrUtil.format(messageTemplate, params), throwable);
|
||||||
}
|
}
|
||||||
|
@ -26,6 +26,10 @@ public class MailException extends RuntimeException{
|
|||||||
super(message, 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) {
|
public MailException(Throwable throwable, String messageTemplate, Object... params) {
|
||||||
super(StrUtil.format(messageTemplate, params), throwable);
|
super(StrUtil.format(messageTemplate, params), throwable);
|
||||||
}
|
}
|
||||||
|
@ -27,6 +27,10 @@ public class PinyinException extends RuntimeException {
|
|||||||
super(message, throwable);
|
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) {
|
public PinyinException(Throwable throwable, String messageTemplate, Object... params) {
|
||||||
super(StrUtil.format(messageTemplate, params), throwable);
|
super(StrUtil.format(messageTemplate, params), throwable);
|
||||||
}
|
}
|
||||||
|
@ -27,6 +27,10 @@ public class QrCodeException extends RuntimeException {
|
|||||||
super(message, throwable);
|
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) {
|
public QrCodeException(Throwable throwable, String messageTemplate, Object... params) {
|
||||||
super(StrUtil.format(messageTemplate, params), throwable);
|
super(StrUtil.format(messageTemplate, params), throwable);
|
||||||
}
|
}
|
||||||
|
@ -26,6 +26,10 @@ public class JschRuntimeException extends RuntimeException{
|
|||||||
super(message, 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) {
|
public JschRuntimeException(Throwable throwable, String messageTemplate, Object... params) {
|
||||||
super(StrUtil.format(messageTemplate, params), throwable);
|
super(StrUtil.format(messageTemplate, params), throwable);
|
||||||
}
|
}
|
||||||
|
@ -27,6 +27,10 @@ public class TemplateException extends RuntimeException {
|
|||||||
super(message, throwable);
|
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) {
|
public TemplateException(Throwable throwable, String messageTemplate, Object... params) {
|
||||||
super(StrUtil.format(messageTemplate, params), throwable);
|
super(StrUtil.format(messageTemplate, params), throwable);
|
||||||
}
|
}
|
||||||
|
@ -27,6 +27,10 @@ public class TokenizerException extends RuntimeException {
|
|||||||
super(message, throwable);
|
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) {
|
public TokenizerException(Throwable throwable, String messageTemplate, Object... params) {
|
||||||
super(StrUtil.format(messageTemplate, params), throwable);
|
super(StrUtil.format(messageTemplate, params), throwable);
|
||||||
}
|
}
|
||||||
|
@ -4,6 +4,7 @@ import cn.hutool.core.util.StrUtil;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* HTTP异常
|
* HTTP异常
|
||||||
|
*
|
||||||
* @author xiaoleilu
|
* @author xiaoleilu
|
||||||
*/
|
*/
|
||||||
public class HttpException extends RuntimeException {
|
public class HttpException extends RuntimeException {
|
||||||
@ -25,6 +26,10 @@ public class HttpException extends RuntimeException{
|
|||||||
super(message, 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) {
|
public HttpException(Throwable throwable, String messageTemplate, Object... params) {
|
||||||
super(StrUtil.format(messageTemplate, params), throwable);
|
super(StrUtil.format(messageTemplate, params), throwable);
|
||||||
}
|
}
|
||||||
|
@ -28,6 +28,10 @@ public class JSONException extends RuntimeException {
|
|||||||
super(message, cause);
|
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) {
|
public JSONException(Throwable throwable, String messageTemplate, Object... params) {
|
||||||
super(StrUtil.format(messageTemplate, params), throwable);
|
super(StrUtil.format(messageTemplate, params), throwable);
|
||||||
}
|
}
|
||||||
|
@ -28,6 +28,10 @@ public class JWTException extends RuntimeException {
|
|||||||
super(message, cause);
|
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) {
|
public JWTException(Throwable throwable, String messageTemplate, Object... params) {
|
||||||
super(StrUtil.format(messageTemplate, params), throwable);
|
super(StrUtil.format(messageTemplate, params), throwable);
|
||||||
}
|
}
|
||||||
|
@ -5,6 +5,7 @@ import cn.hutool.core.util.StrUtil;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* POI异常
|
* POI异常
|
||||||
|
*
|
||||||
* @author xiaoleilu
|
* @author xiaoleilu
|
||||||
*/
|
*/
|
||||||
public class POIException extends RuntimeException {
|
public class POIException extends RuntimeException {
|
||||||
@ -26,6 +27,10 @@ public class POIException extends RuntimeException{
|
|||||||
super(message, 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) {
|
public POIException(Throwable throwable, String messageTemplate, Object... params) {
|
||||||
super(StrUtil.format(messageTemplate, params), throwable);
|
super(StrUtil.format(messageTemplate, params), throwable);
|
||||||
}
|
}
|
||||||
|
@ -33,6 +33,10 @@ public class ScriptRuntimeException extends RuntimeException {
|
|||||||
super(message, throwable);
|
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) {
|
public ScriptRuntimeException(Throwable throwable, String messageTemplate, Object... params) {
|
||||||
super(StrUtil.format(messageTemplate, params), throwable);
|
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.
|
* 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 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 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.
|
* @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) {
|
public ScriptRuntimeException(String message, String fileName, int lineNumber) {
|
||||||
|
@ -4,6 +4,7 @@ import cn.hutool.core.util.StrUtil;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 设置异常
|
* 设置异常
|
||||||
|
*
|
||||||
* @author xiaoleilu
|
* @author xiaoleilu
|
||||||
*/
|
*/
|
||||||
public class SettingRuntimeException extends RuntimeException {
|
public class SettingRuntimeException extends RuntimeException {
|
||||||
@ -25,6 +26,10 @@ public class SettingRuntimeException extends RuntimeException{
|
|||||||
super(message, 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) {
|
public SettingRuntimeException(Throwable throwable, String messageTemplate, Object... params) {
|
||||||
super(StrUtil.format(messageTemplate, params), throwable);
|
super(StrUtil.format(messageTemplate, params), throwable);
|
||||||
}
|
}
|
||||||
|
@ -27,6 +27,10 @@ public class SocketRuntimeException extends RuntimeException {
|
|||||||
super(message, throwable);
|
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) {
|
public SocketRuntimeException(Throwable throwable, String messageTemplate, Object... params) {
|
||||||
super(StrUtil.format(messageTemplate, params), throwable);
|
super(StrUtil.format(messageTemplate, params), throwable);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user