throw new CommunicationException(
errorMessage == null ? "@text/offline.communication-error" : errorMessage, e.getCause());
}
- } catch (InterruptedException | TimeoutException e) {
+ } catch (TimeoutException e) {
String errorMessage = e.getMessage();
- logger.debug("InterruptedException or TimeoutException occurred during execution: {}", errorMessage, e);
+ logger.debug("TimeoutException occurred during execution: {}", errorMessage, e);
+ throw new CommunicationException(errorMessage == null ? "@text/offline.communication-error" : errorMessage,
+ e.getCause());
+ } catch (InterruptedException e) {
+ String errorMessage = e.getMessage();
+ logger.debug("InterruptedException occurred during execution: {}", errorMessage, e);
+ Thread.currentThread().interrupt();
throw new CommunicationException(errorMessage == null ? "@text/offline.communication-error" : errorMessage,
e.getCause());
}
updateStatus(ThingStatus.ONLINE);
}
} catch (CommunicationException e) {
- updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.COMMUNICATION_ERROR, e.getLocalizedMessage());
+ updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.COMMUNICATION_ERROR, e.getRawMessage());
} catch (ConfigurationException e) {
- updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.CONFIGURATION_ERROR, e.getLocalizedMessage());
+ updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.CONFIGURATION_ERROR, e.getRawMessage());
}
}