mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-04-19 03:01:48 +08:00
add constructor
This commit is contained in:
parent
c0510a4c66
commit
d66efef873
@ -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)
|
||||
|
@ -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) {
|
||||
|
@ -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) {
|
||||
|
@ -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) {
|
||||
|
@ -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) {
|
||||
|
@ -4,9 +4,10 @@ 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) {
|
||||
@ -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);
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -3,10 +3,11 @@ 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) {
|
||||
@ -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);
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -5,9 +5,10 @@ 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) {
|
||||
@ -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);
|
||||
}
|
||||
|
@ -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 <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 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) {
|
||||
@ -55,9 +57,9 @@ public class ScriptRuntimeException extends RuntimeException {
|
||||
/**
|
||||
* <code>ScriptException</code> 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) {
|
||||
@ -118,7 +120,7 @@ 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 <i><unknown></i> if a description of the
|
||||
* source is unavailable.
|
||||
* source is unavailable.
|
||||
*/
|
||||
public String getFileName() {
|
||||
return fileName;
|
||||
|
@ -4,9 +4,10 @@ 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) {
|
||||
@ -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);
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user