Package cloud.opencode.base.basecode
Class CodeException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
cloud.opencode.base.basecode.CodeException
- All Implemented Interfaces:
Serializable
Unified exception class for API responses
统一的API响应异常类
- Author:
- Jon url: Jon's blog url: OpenCode.cloud
- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor 默认构造方法CodeException(String message) Constructor with message 带消息的构造方法CodeException(String message, Integer code, Throwable cause) Constructor with message, code and cause 带消息、代码和原因的构造方法CodeException(String message, Throwable cause) Constructor with message and cause 带消息和原因的构造方法CodeException(String message, org.springframework.http.HttpStatus status) Constructor with message and status 带消息和状态的构造方法CodeException(String message, org.springframework.http.HttpStatus status, Integer code) Constructor with message, status and code 带消息、状态和代码的构造方法CodeException(String message, org.springframework.http.HttpStatus status, Integer code, Throwable cause) Constructor with message, status, code and cause 带消息、状态、代码和原因的构造方法 -
Method Summary
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
message
Error message / 错误消息 -
status
private final org.springframework.http.HttpStatusCode statusHTTP status code / HTTP状态码 -
code
Error code / 错误代码
-
-
Constructor Details
-
CodeException
public CodeException()Default constructor 默认构造方法 -
CodeException
Constructor with message 带消息的构造方法- Parameters:
message- Error message / 错误消息
-
CodeException
Constructor with message and status 带消息和状态的构造方法- Parameters:
message- Error message / 错误消息status- HTTP status / HTTP状态
-
CodeException
Constructor with message and cause 带消息和原因的构造方法- Parameters:
message- Error message / 错误消息cause- Original exception / 原始异常
-
CodeException
public CodeException(String message, @Nullable org.springframework.http.HttpStatus status, @Nullable Integer code) Constructor with message, status and code 带消息、状态和代码的构造方法- Parameters:
message- Error message / 错误消息status- HTTP status / HTTP状态code- Error code / 错误代码
-
CodeException
Constructor with message, code and cause 带消息、代码和原因的构造方法- Parameters:
message- Error message / 错误消息code- Error code / 错误代码cause- Original exception / 原始异常
-
CodeException
public CodeException(String message, @Nullable org.springframework.http.HttpStatus status, @Nullable Integer code, @Nullable Throwable cause) Constructor with message, status, code and cause 带消息、状态、代码和原因的构造方法- Parameters:
message- Error message / 错误消息status- HTTP status / HTTP状态code- Error code / 错误代码cause- Original exception / 原始异常
-