[bindings d-e] Fix exception handling (Jetty HTTP client) (#10476)
Fixes #10474 Signed-off-by: Laurent Garnier <lg.hc@free.fr>
This commit is contained in:
@@ -191,9 +191,13 @@ public class EtherRainCommunication {
|
||||
logger.warn("Etherrain return status other than HTTP_OK : {}", response.getStatus());
|
||||
return Collections.emptyList();
|
||||
}
|
||||
} catch (InterruptedException | TimeoutException | ExecutionException e) {
|
||||
} catch (TimeoutException | ExecutionException e) {
|
||||
logger.warn("Could not connect to Etherrain with exception: {}", e.getMessage());
|
||||
return Collections.emptyList();
|
||||
} catch (InterruptedException e) {
|
||||
logger.warn("Connect to Etherrain interrupted: {}", e.getMessage());
|
||||
Thread.currentThread().interrupt();
|
||||
return Collections.emptyList();
|
||||
}
|
||||
|
||||
return new BufferedReader(new StringReader(response.getContentAsString())).lines().collect(Collectors.toList());
|
||||
|
||||
Reference in New Issue
Block a user