
public class Status {
public int status;
public String code;
public static Status OK = new Status(200,"OK");
public static Status NOT_FOUND = new Status(404,"NOT FOUND");
public static Status REQUEST_TIMEOUT = new Status(408,"REQUEST TIMEOUT");
public static Status RETRY_LATER = new Status(417,"RETRY LATER");
public static Status SREVER_INTERNAL_ERROR = new Status(500,"SERVER INTERNAL ERROR");
public static Status PROCESSING_ERROR = new Status(506,"PROCESSING ERROR");
}
public class ServiceException extends Exception {
private Status status;
public Status getStatus() { return status; }
public ServiceException(String msg);
public ServiceException(String msg, Status status);
public ServiceException(String msg, Throwable cause);
public ServiceException(Throwable cause);
public ServiceException(String msg, Throwable cause, Status status);
}
近期评论