[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:
@@ -363,6 +363,9 @@ public abstract class DLinkHNAPCommunication {
|
||||
} catch (final NoSuchAlgorithmException e) {
|
||||
logger.debug("login - Internal error", e);
|
||||
status = HNAPStatus.INTERNAL_ERROR;
|
||||
} catch (final InterruptedException e) {
|
||||
status = HNAPStatus.COMMUNICATION_ERROR;
|
||||
Thread.currentThread().interrupt();
|
||||
} catch (final Exception e) {
|
||||
// Assume there has been some problem trying to send one of the messages
|
||||
if (status != HNAPStatus.COMMUNICATION_ERROR) {
|
||||
|
||||
@@ -278,6 +278,9 @@ public class DLinkMotionSensorCommunication extends DLinkHNAPCommunication {
|
||||
} else {
|
||||
unexpectedResult("getLastDetection - Unexpected response", soapResponse);
|
||||
}
|
||||
} catch (final InterruptedException e) {
|
||||
status = DeviceStatus.COMMUNICATION_ERROR;
|
||||
Thread.currentThread().interrupt();
|
||||
} catch (final Exception e) {
|
||||
// Assume there has been some problem trying to send one of the messages
|
||||
if (status != DeviceStatus.COMMUNICATION_ERROR) {
|
||||
|
||||
Reference in New Issue
Block a user