public class DataThrowable extends RuntimeException implements Serializable
//定义个 DataThrowable 的数据结构
public class UapiCode extends DataThrowable{
public final int code;
public final String message;
public UapiCode(int code, String message){
super(message);
this.code = code;
this.message = message;
}
}| Constructor and Description |
|---|
DataThrowable() |
DataThrowable(String message) |
DataThrowable(String message,
Throwable cause) |
DataThrowable(Throwable cause) |
| Modifier and Type | Method and Description |
|---|---|
Object |
data()
数据获取
|
DataThrowable |
data(Object data)
数据设定
|
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toStringpublic DataThrowable()
public DataThrowable(Throwable cause)
public DataThrowable(String message)
public Object data()
public DataThrowable data(Object data)
Copyright © 2025. All rights reserved.