- return 1;
- } catch (GroupNotFoundException e) {
- handleGroupNotFoundException(e);
- return 1;
- } catch (NotAGroupMemberException e) {
- handleNotAGroupMemberException(e);
- return 1;
- } catch (GroupIdFormatException e) {
- handleGroupIdFormatException(e);
- return 1;
- } catch (InvalidNumberException e) {
- handleInvalidNumberException(e);
- return 1;
+ throw e;
+ } catch (UnknownObject e) {
+ throw new UserErrorException("Failed to find dbus object, maybe missing the -u flag: " + e.getMessage());
+ } catch (Signal.Error.InvalidNumber e) {
+ throw new UserErrorException("Invalid number: " + e.getMessage());
+ } catch (Signal.Error.GroupNotFound e) {
+ throw new UserErrorException("Failed to send to group: " + e.getMessage());
+ } catch (DBusExecutionException e) {
+ throw new UnexpectedErrorException("Failed to send message: " + e.getMessage());