Cleanup: don't catch generic exception

This commit is contained in:
Laurent Clouet
2016-02-18 18:30:05 +01:00
parent 554d6562df
commit 2d86fcd70e

View File

@@ -252,6 +252,10 @@ public class Server extends Thread implements HostnameVerifier, X509TrustManager
this.log.error("Server::getConfiguration error ConnectException " + e); this.log.error("Server::getConfiguration error ConnectException " + e);
return Error.Type.NETWORK_ISSUE; return Error.Type.NETWORK_ISSUE;
} }
catch (UnsupportedEncodingException e) {
this.log.error("Server::getConfiguration: exception UnsupportedEncodingException " + e);
return Error.Type.UNKNOWN;
}
catch (UnknownHostException e) { catch (UnknownHostException e) {
this.log.error("Server::getConfiguration error UnknownHostException " + e); this.log.error("Server::getConfiguration error UnknownHostException " + e);
return Error.Type.NETWORK_ISSUE; return Error.Type.NETWORK_ISSUE;
@@ -260,9 +264,8 @@ public class Server extends Thread implements HostnameVerifier, X509TrustManager
this.log.error("Server::getConfiguration error NoRouteToHost " + e); this.log.error("Server::getConfiguration error NoRouteToHost " + e);
return Error.Type.NETWORK_ISSUE; return Error.Type.NETWORK_ISSUE;
} }
catch (Exception e) { catch (IOException e) {
this.log.error("Server::getConfiguration: exception 02R " + e); this.log.error("Server::getConfiguration: exception IOException " + e);
e.printStackTrace();
return Error.Type.UNKNOWN; return Error.Type.UNKNOWN;
} }
finally { finally {