- handleIOException(e);
- return 3;
- } catch (AssertionError e) {
- handleAssertionError(e);
- return 1;
- } catch (GroupNotFoundException e) {
- handleGroupNotFoundException(e);
- return 1;
- } catch (NotAGroupMemberException e) {
- handleNotAGroupMemberException(e);
- return 1;
- } catch (GroupIdFormatException e) {
- handleGroupIdFormatException(e);
- return 1;
+ throw new IOErrorException("Failed to send message: " + e.getMessage());
+ } catch (GroupNotFoundException | NotAGroupMemberException e) {
+ throw new UserErrorException("Failed to send to group: " + e.getMessage());