From: David ‘Bombe’ Roden Date: Thu, 2 May 2013 19:06:49 +0000 (+0200) Subject: Send connection closed event when a runtime exception occurs. X-Git-Url: https://git.pterodactylus.net/?p=xudocci.git;a=commitdiff_plain;h=d72a8d36fc0d97c3ddba049b6fa85c3a69fd7118 Send connection closed event when a runtime exception occurs. --- diff --git a/src/main/java/net/pterodactylus/irc/Connection.java b/src/main/java/net/pterodactylus/irc/Connection.java index 15dde44..b67b8db 100644 --- a/src/main/java/net/pterodactylus/irc/Connection.java +++ b/src/main/java/net/pterodactylus/irc/Connection.java @@ -511,6 +511,9 @@ public class Connection extends AbstractExecutionThreadService implements Servic } catch (IOException ioe1) { logger.log(Level.WARNING, "I/O error", ioe1); eventBus.post(new ConnectionClosed(this, ioe1)); + } catch (RuntimeException re1) { + logger.log(Level.SEVERE, "Runtime error", re1); + eventBus.post(new ConnectionClosed(this, re1)); } finally { established = false; logger.info("Closing Connection.");