From 2144fa183721e1cae64f20bad35da4c8f40fd4b3 Mon Sep 17 00:00:00 2001 From: Myles Date: Tue, 8 Mar 2016 21:16:34 +0000 Subject: [PATCH] Handle any exception so it doesn't implode. (Still prints to the console.) --- .../java/us/myles/ViaVersion/handlers/ViaDecodeHandler.java | 2 +- .../java/us/myles/ViaVersion/handlers/ViaEncodeHandler.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/us/myles/ViaVersion/handlers/ViaDecodeHandler.java b/src/main/java/us/myles/ViaVersion/handlers/ViaDecodeHandler.java index 08466754d..d283e39e1 100644 --- a/src/main/java/us/myles/ViaVersion/handlers/ViaDecodeHandler.java +++ b/src/main/java/us/myles/ViaVersion/handlers/ViaDecodeHandler.java @@ -34,7 +34,7 @@ public class ViaDecodeHandler extends ByteToMessageDecoder { incomingTransformer.transform(id, bytebuf, newPacket); bytebuf.clear(); bytebuf = newPacket; - } catch (CancelException e) { + } catch (Exception e) { bytebuf.clear(); throw e; } diff --git a/src/main/java/us/myles/ViaVersion/handlers/ViaEncodeHandler.java b/src/main/java/us/myles/ViaVersion/handlers/ViaEncodeHandler.java index 439396ee1..78b839ba5 100644 --- a/src/main/java/us/myles/ViaVersion/handlers/ViaEncodeHandler.java +++ b/src/main/java/us/myles/ViaVersion/handlers/ViaEncodeHandler.java @@ -73,7 +73,7 @@ public class ViaEncodeHandler extends MessageToByteEncoder { bytebuf.clear(); try { outgoingTransformer.transform(id, oldPacket, bytebuf); - } catch (CancelException e) { + } catch (Exception e) { bytebuf.clear(); throw e; } finally {