Skip to content

Commit

Permalink
Fix missing channel exception handler for QUIT, fix typos in PART and
Browse files Browse the repository at this point in the history
MODE command handlers
  • Loading branch information
MCMrARM committed Nov 25, 2017
1 parent ba60097 commit 8928d08
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
Expand Up @@ -37,7 +37,7 @@ public void handle(ServerConnectionData connection, MessagePrefix sender, String
// TODO: user modes
}
} catch (NoSuchChannelException e) {
throw new InvalidMessageException("Invalid channel specified in a JOIN message", e);
throw new InvalidMessageException("Invalid channel specified in a MODE message", e);
} catch (InterruptedException | ExecutionException e) {
throw new RuntimeException(e);
}
Expand Down
Expand Up @@ -37,7 +37,7 @@ public void handle(ServerConnectionData connection, MessagePrefix sender, String
channelData.addMessage(new MessageInfo.Builder(senderInfo, message, MessageInfo.MessageType.PART), tags);
}
} catch (NoSuchChannelException e) {
throw new InvalidMessageException("Invalid channel specified in a JOIN message", e);
throw new InvalidMessageException("Invalid channel specified in a PART message", e);
} catch (InterruptedException | ExecutionException e) {
throw new RuntimeException(e);
}
Expand Down
Expand Up @@ -31,7 +31,9 @@ public void handle(ServerConnectionData connection, MessagePrefix sender, String
channelData.removeMember(channelData.getMember(userInfo.getUUID()));
channelData.addMessage(new MessageInfo.Builder(senderInfo, params.get(0), MessageInfo.MessageType.QUIT), tags);
}
} catch (InterruptedException | ExecutionException | NoSuchChannelException e) {
} catch (NoSuchChannelException e) {
throw new InvalidMessageException("Invalid channel specified in a QUIT message", e);
} catch (InterruptedException | ExecutionException e) {
throw new RuntimeException(e);
}
}
Expand Down

0 comments on commit 8928d08

Please sign in to comment.