Class StatefulException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
org.miaixz.bus.core.lang.exception.UncheckedException
org.miaixz.bus.core.lang.exception.InternalException
org.miaixz.bus.core.lang.exception.StatefulException
- All Implemented Interfaces:
Serializable
带有状态码的异常
- Since:
- Java 17+
- Author:
- Kimi Liu
- See Also:
-
Field Summary
Fields inherited from class org.miaixz.bus.core.lang.exception.UncheckedException
errcode, errmsg -
Constructor Summary
ConstructorsConstructorDescription构造StatefulException(int status, String msg) 构造StatefulException(int status, String msg, Throwable throwable) StatefulException(int status, Throwable throwable) 构造StatefulException(String message) 构造StatefulException(String messageTemplate, Object... params) 构造StatefulException(String message, Throwable cause) 构造StatefulException(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace) 构造构造StatefulException(Throwable cause, String messageTemplate, Object... params) 构造 -
Method Summary
Methods inherited from class org.miaixz.bus.core.lang.exception.InternalException
causeInstanceOfMethods inherited from class org.miaixz.bus.core.lang.exception.UncheckedException
impossible, isCauseBy, noImplement, unwrapThrowMethods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
StatefulException
public StatefulException()构造 -
StatefulException
构造- Parameters:
e- 异常
-
StatefulException
构造- Parameters:
message- 消息
-
StatefulException
构造- Parameters:
messageTemplate- 消息模板params- 参数
-
StatefulException
构造- Parameters:
message- 消息cause- 被包装的子异常
-
StatefulException
public StatefulException(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace) 构造- Parameters:
message- 消息cause- 被包装的子异常enableSuppression- 是否启用抑制writableStackTrace- 堆栈跟踪是否应该是可写的
-
StatefulException
构造- Parameters:
cause- 被包装的子异常messageTemplate- 消息模板params- 参数
-
StatefulException
构造- Parameters:
status- 状态码msg- 消息
-
StatefulException
构造- Parameters:
status- 状态码throwable- 异常
-
StatefulException
- Parameters:
status- 状态码msg- 消息throwable- 异常
-
-
Method Details
-
getStatus
public int getStatus()- Returns:
- 获得异常状态码
-