Fix: raise the right exception on failed to connect to server
This commit is contained in:
@@ -482,6 +482,9 @@ public class Server extends Thread {
|
||||
this.lastRequestTime = new Date().getTime();
|
||||
return response;
|
||||
}
|
||||
catch (ConnectException e) {
|
||||
throw new ConnectException("Unexpected response from HTTP Stack" + e.getMessage());
|
||||
}
|
||||
catch (IOException e) {
|
||||
throw new IOException("Unexpected response from HTTP Stack" + e.getMessage());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user