mirror of
https://github.com/klmp200/PQT_Gestionnaire_vente_stock.git
synced 2024-11-25 02:24:17 +00:00
[CLIENT] Ajout d'un catch de ConnectException dans la clss HttpTextSender; Ajout d'un todo à cet endroit
This commit is contained in:
parent
ed02c20be0
commit
c146ecf55b
@ -7,6 +7,7 @@ import java.io.BufferedReader;
|
|||||||
import java.io.DataOutputStream;
|
import java.io.DataOutputStream;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.InputStreamReader;
|
import java.io.InputStreamReader;
|
||||||
|
import java.net.ConnectException;
|
||||||
import java.net.HttpURLConnection;
|
import java.net.HttpURLConnection;
|
||||||
import java.net.URL;
|
import java.net.URL;
|
||||||
import java.net.URLEncoder;
|
import java.net.URLEncoder;
|
||||||
@ -41,7 +42,8 @@ public class HttpTextSender implements ITextSender{
|
|||||||
|
|
||||||
con.disconnect();
|
con.disconnect();
|
||||||
|
|
||||||
}catch (java.net.SocketTimeoutException e){
|
}catch (java.net.SocketTimeoutException | ConnectException e){
|
||||||
|
//TODO ajouter un log ici
|
||||||
listener.onTimeOutEvent();
|
listener.onTimeOutEvent();
|
||||||
}catch (IOException e) {
|
}catch (IOException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
|
Loading…
Reference in New Issue
Block a user