mirror of
https://github.com/AsamK/signal-cli.git
synced 2026-05-29 15:04:16 +00:00
Print user number in UserAlreadyExistsException DBus error
Currently, the error looks like "UserAlreadyExistsException null", which does not give enough information to handle this situation in the multi-account daemon mode. This change adds a phone number to the error message resolving my issue and achieving functional parity with CLI interface.
This commit is contained in:
parent
8dcc16d640
commit
11d96c894d
@ -145,7 +145,9 @@ public class DbusSignalControlImpl implements org.asamk.SignalControl {
|
||||
try {
|
||||
final var provisioningManager = c.getProvisioningManagerFor(new URI(deviceLinkUri));
|
||||
return provisioningManager.finishDeviceLink(newDeviceName);
|
||||
} catch (TimeoutException | IOException | UserAlreadyExistsException | URISyntaxException e) {
|
||||
} catch (UserAlreadyExistsException e) {
|
||||
throw new SignalControl.Error.Failure(e.getClass().getSimpleName() + " " + e.getNumber());
|
||||
} catch (TimeoutException | IOException | URISyntaxException e) {
|
||||
throw new SignalControl.Error.Failure(e.getClass().getSimpleName() + " " + e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user