mirror of
https://github.com/openhab/openhab-addons.git
synced 2025-01-10 15:11:59 +01:00
[remoteopenhab] Avoid catching Exception (#10461)
Signed-off-by: Laurent Garnier <lg.hc@free.fr>
This commit is contained in:
parent
782fe0eb8f
commit
d39e24bdf0
@ -14,6 +14,7 @@ package org.openhab.binding.remoteopenhab.internal.rest;
|
||||
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.EOFException;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.util.Arrays;
|
||||
@ -25,6 +26,7 @@ import java.util.Objects;
|
||||
import java.util.concurrent.CopyOnWriteArrayList;
|
||||
import java.util.concurrent.ExecutionException;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import java.util.concurrent.TimeoutException;
|
||||
|
||||
import javax.net.ssl.HostnameVerifier;
|
||||
import javax.net.ssl.SSLSession;
|
||||
@ -576,7 +578,10 @@ public class RemoteopenhabRestClient {
|
||||
} else {
|
||||
throw new RemoteopenhabException(e);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
} catch (IOException | TimeoutException e) {
|
||||
throw new RemoteopenhabException(e);
|
||||
} catch (InterruptedException e) {
|
||||
Thread.currentThread().interrupt();
|
||||
throw new RemoteopenhabException(e);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user