cn.icanci.loopstack.rec.engine.script.client.RemoteException Maven / Gradle / Ivy
package cn.icanci.loopstack.rec.engine.script.client;
/**
* @author icanci
* @since 1.0 Created in 2022/11/14 22:15
*/
public class RemoteException extends RuntimeException {
/** 序列化版本 */
private static final long serialVersionUID = -850230685842125442L;
private int code = -1;
/**
* Constructs a new exception with the specified detail message. The
* cause is not initialized, and may subsequently be initialized by
* a call to {@link #initCause}.
*
* @param code error code
* @param message the detail message. The detail message is saved for
* later retrieval by the {@link #getMessage()} method.
*/
public RemoteException(int code, String message) {
super(message);
this.code = code;
}
/**
* Constructs a new exception with the specified detail message. The
* cause is not initialized, and may subsequently be initialized by
* a call to {@link #initCause}.
*
* @param message the detail message. The detail message is saved for
* later retrieval by the {@link #getMessage()} method.
*/
public RemoteException(String message) {
super(message);
}
/**
* Constructs a new exception with the specified detail message and
* cause. Note that the detail message associated with
* {@code cause} is not automatically incorporated in
* this exception's detail message.
*
* @param code error code
* @param message the detail message (which is saved for later retrieval
* by the {@link #getMessage()} method).
* @param cause the cause (which is saved for later retrieval by the
* {@link #getCause()} method). (A null value is
* permitted, and indicates that the cause is nonexistent or
* unknown.)
* @since 1.4
*/
public RemoteException(int code, String message, Throwable cause) {
super(message, cause);
this.code = code;
}
/**
* Constructs a new exception with the specified detail message and
* cause.
Note that the detail message associated with
* {@code cause} is not automatically incorporated in
* this exception's detail message.
*
* @param message the detail message (which is saved for later retrieval
* by the {@link #getMessage()} method).
* @param cause the cause (which is saved for later retrieval by the
* {@link #getCause()} method). (A null value is
* permitted, and indicates that the cause is nonexistent or
* unknown.)
* @since 1.4
*/
public RemoteException(String message, Throwable cause) {
super(message, cause);
}
/**
* Constructs a new exception with the specified cause and a detail
* message of (cause==null ? null : cause.toString()) (which
* typically contains the class and detail message of cause).
* This constructor is useful for exceptions that are little more than
* wrappers for other throwables (for example, {@link
* PrivilegedActionException}).
*
* @param code error code
* @param cause the cause (which is saved for later retrieval by the
* {@link #getCause()} method). (A null value is
* permitted, and indicates that the cause is nonexistent or
* unknown.)
* @since 1.4
*/
public RemoteException(int code, Throwable cause) {
super(cause);
this.code = code;
}
/**
* Constructs a new exception with the specified cause and a detail
* message of (cause==null ? null : cause.toString()) (which
* typically contains the class and detail message of cause).
* This constructor is useful for exceptions that are little more than
* wrappers for other throwables (for example, {@link
* PrivilegedActionException}).
*
* @param cause the cause (which is saved for later retrieval by the
* {@link #getCause()} method). (A null value is
* permitted, and indicates that the cause is nonexistent or
* unknown.)
* @since 1.4
*/
public RemoteException(Throwable cause) {
super(cause);
}
}