package com.jqyd.camera;
public class ExcutefailedException extends Exception{
/**
*
*/
private static final long serialVersionUID = 5789470795043555596L;
/**
* -1 连接超时
*/
public static final int Connect_Timeout = -1;
/**
* -2 返回内容格式错误
*/
public static final int Response_Formaterror = -2;
/**
* -3 服务器端执行错误
*/
public static final int Server_error = -3;
/**
* -4 请求数据格式错误
*/
public static final int Request_Formaterror = -4;
/**
* -5 会话失效
*/
public static final int Session_Failed = -5;
/**
* -6 帐号发生重复登录
*/
@Deprecated
public static final int Session_Repeat = -6;
public static final int Exception_LocalSqlError = -10;
// =============b2b(md)================================
private int errorCode;
public ExcutefailedException(String msg){
super(msg);
try{
errorCode = Integer.parseInt(msg);
}catch (Exception e) {
errorCode = Server_error;
}
}
public ExcutefailedException(int error){
super(error+"");
this.errorCode = error;
}
public ExcutefailedException(int errorCode, String errorMessage) {
super(errorMessage);
this.errorCode = errorCode;
}
public ExcutefailedException(Throwable e){
super(e);
errorCode = Server_error;
}
public int getErrorCode(){
return errorCode;
}
public void setErrorCode(int errorCode){
this.errorCode = errorCode;
}
}