From: David ‘Bombe’ Roden Date: Sat, 10 Aug 2013 20:54:45 +0000 (+0200) Subject: Catch exceptions when trying to join channels. X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=a94f83c63a742aad3deeeb110032b3a3efc9da58;p=xudocci.git Catch exceptions when trying to join channels. --- diff --git a/src/main/java/net/pterodactylus/xdcc/core/Core.java b/src/main/java/net/pterodactylus/xdcc/core/Core.java index e2710e4..240beb1 100644 --- a/src/main/java/net/pterodactylus/xdcc/core/Core.java +++ b/src/main/java/net/pterodactylus/xdcc/core/Core.java @@ -345,7 +345,11 @@ public class Core extends AbstractExecutionThreadService { Connection connection = networkConnections.get(channel.network()); if (connection.established()) { eventBus.post(new GenericMessage(String.format("Trying to join %s on %s.", channel.name(), channel.network().name()))); - connection.joinChannel(channel.name()); + try { + connection.joinChannel(channel.name()); + } catch (IOException ioe1) { + eventBus.post(new GenericMessage(String.format("Could not join %s on %s.", channel.name(), channel.network().name()))); + } } } }