Show better error message when using addDevice on a linked device
This commit is contained in:
parent
6d23eb3bf6
commit
a9f1944636
@ -185,6 +185,8 @@ public class DbusSignalImpl implements Signal {
|
|||||||
m.addDeviceLink(deviceLinkUrl);
|
m.addDeviceLink(deviceLinkUrl);
|
||||||
} catch (IOException | InvalidDeviceLinkException e) {
|
} catch (IOException | InvalidDeviceLinkException e) {
|
||||||
throw new Error.Failure(e.getClass().getSimpleName() + " Add device link failed. " + e.getMessage());
|
throw new Error.Failure(e.getClass().getSimpleName() + " Add device link failed. " + e.getMessage());
|
||||||
|
} catch (NotPrimaryDeviceException e) {
|
||||||
|
throw new Error.Failure("This command doesn't work on linked devices.");
|
||||||
} catch (URISyntaxException e) {
|
} catch (URISyntaxException e) {
|
||||||
throw new Error.InvalidUri(e.getClass().getSimpleName()
|
throw new Error.InvalidUri(e.getClass().getSimpleName()
|
||||||
+ " Device link uri has invalid format: "
|
+ " Device link uri has invalid format: "
|
||||||
|
Loading…
x
Reference in New Issue
Block a user