mirror of
https://github.com/opennetworkinglab/onos.git
synced 2025-11-02 09:11:29 +01:00
Improve error handling on Rest SB Provider
Change-Id: Id0dbd88c32fb18de9687ebc6cdc113b3af16ae13
This commit is contained in:
parent
efa05b4d1c
commit
e45e12c0e9
@ -442,14 +442,14 @@ public class RestDeviceProvider extends AbstractProvider
|
||||
try {
|
||||
return future.get(REST_TIMEOUT_SEC, TimeUnit.SECONDS);
|
||||
} catch (TimeoutException ex) {
|
||||
log.warn("Connection to device {} timed out", dev.deviceId());
|
||||
log.warn("Connection to device {} timed out: {}", dev.deviceId(), ex.getMessage());
|
||||
return false;
|
||||
} catch (InterruptedException ex) {
|
||||
log.warn("Connection to device {} interrupted", dev.deviceId());
|
||||
log.warn("Connection to device {} interrupted: {}", dev.deviceId(), ex.getMessage());
|
||||
Thread.currentThread().interrupt();
|
||||
return false;
|
||||
} catch (ExecutionException ex) {
|
||||
log.warn("Connection to device {} had a execution exception", dev.deviceId());
|
||||
log.warn("Connection to device {} had an execution exception.", dev.deviceId(), ex);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user