- return 0;
- } catch (IOException e) {
- handleIOException(e);
- return 3;
- } catch (AttachmentInvalidException e) {
- System.err.println("Failed to add avatar attachment for group\": " + e.getMessage());
- System.err.println("Aborting sending.");
- return 1;
- } catch (GroupNotFoundException e) {
- handleGroupNotFoundException(e);
- return 1;
- } catch (NotAGroupMemberException e) {
- handleNotAGroupMemberException(e);
- return 1;
- } catch (EncapsulatedExceptions e) {
- handleEncapsulatedExceptions(e);
- return 3;
- } catch (GroupIdFormatException e) {
- handleGroupIdFormatException(e);
- return 1;
- } catch (InvalidNumberException e) {
- handleInvalidNumberException(e);
- return 1;
+ } catch (AssertionError e) {
+ handleAssertionError(e);
+ throw e;
+ } catch (Signal.Error.AttachmentInvalid e) {
+ throw new UserErrorException("Failed to add avatar attachment for group\": " + e.getMessage());
+ } catch (DBusExecutionException e) {
+ throw new UnexpectedErrorException("Failed to send message: " + e.getMessage());