} catch (GroupNotFoundException e) {
handleGroupNotFoundException(e);
return 1;
+ } catch (NotAGroupMemberException e) {
+ handleNotAGroupMemberException(e);
+ return 1;
} catch (AttachmentInvalidException e) {
System.err.println("Failed to add attachment: " + e.getMessage());
System.err.println("Aborting sending.");
} catch (GroupNotFoundException e) {
handleGroupNotFoundException(e);
return 1;
+ } catch (NotAGroupMemberException e) {
+ handleNotAGroupMemberException(e);
+ return 1;
}
break;
} catch (GroupNotFoundException e) {
handleGroupNotFoundException(e);
return 1;
+ } catch (NotAGroupMemberException e) {
+ handleNotAGroupMemberException(e);
+ return 1;
} catch (EncapsulatedExceptions e) {
handleEncapsulatedExceptions(e);
return 3;
System.err.println("Aborting sending.");
}
+ private static void handleNotAGroupMemberException(NotAGroupMemberException e) {
+ System.err.println("Failed to send to group: " + e.getMessage());
+ System.err.println("Update the group on another device to readd the user to this group.");
+ System.err.println("Aborting sending.");
+ }
+
+
private static void handleDBusExecutionException(DBusExecutionException e) {
System.err.println("Cannot connect to dbus: " + e.getMessage());
System.err.println("Aborting.");