[bindings a-c] Fix exception handling (Jetty HTTP client) (#10467)

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
This commit is contained in:
lolodomo
2021-04-06 17:30:12 +02:00
committed by GitHub
parent a509c3b638
commit fed460218e
6 changed files with 148 additions and 114 deletions

View File

@@ -90,7 +90,10 @@ public class AutomowerConnectApi extends HusqvarnaApi {
ContentResponse response;
try {
response = request.send();
} catch (InterruptedException | TimeoutException | ExecutionException e) {
} catch (TimeoutException | ExecutionException e) {
throw new AutomowerCommunicationException(e);
} catch (InterruptedException e) {
Thread.currentThread().interrupt();
throw new AutomowerCommunicationException(e);
}
return response;