}else if(t instanceof NoRouteToHostException){
return new CannotConnectException("No routeto host", 0);//没有到主机的路由
}else if(t instanceof SocketTimeoutException){
return new CannotConnectException("Read timed out", 1);//读取数据超时
}else if(t instanceof FileNotFoundException){
return new ServerThrowException("Cannot connect to Server",t, 0);//连接失败,导致此异常极有可能服务端异常405
}else{
return new CannotConnectException("连接失败", t,0);
}
}