diff --git a/codec/src/main/java/io/netty/handler/codec/ByteToMessageDecoder.java b/codec/src/main/java/io/netty/handler/codec/ByteToMessageDecoder.java index 28c3dc12f4..9d52b5506e 100644 --- a/codec/src/main/java/io/netty/handler/codec/ByteToMessageDecoder.java +++ b/codec/src/main/java/io/netty/handler/codec/ByteToMessageDecoder.java @@ -265,8 +265,8 @@ public abstract class ByteToMessageDecoder extends ChannelInboundHandlerAdapter callDecode(ctx, cumulation, out); } catch (DecoderException e) { throw e; - } catch (Throwable t) { - throw new DecoderException(t); + } catch (Exception e) { + throw new DecoderException(e); } finally { if (cumulation != null && !cumulation.isReadable()) { numReads = 0; @@ -455,7 +455,7 @@ public abstract class ByteToMessageDecoder extends ChannelInboundHandlerAdapter } } catch (DecoderException e) { throw e; - } catch (Throwable cause) { + } catch (Exception cause) { throw new DecoderException(cause); } }