Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not treat errors as decoder exception #7276

Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -265,8 +265,8 @@ public void channelRead(ChannelHandlerContext ctx, Object msg) throws Exception
callDecode(ctx, cumulation, out);
} catch (DecoderException e) {
throw e;
} catch (Throwable t) {
throw new DecoderException(t);
} catch (Exception e) {
throw new DecoderException(e);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

optional: maybe don't wrap RuntimeExceptions either?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should just handle Error special here imho

} finally {
if (cumulation != null && !cumulation.isReadable()) {
numReads = 0;
Expand Down Expand Up @@ -455,7 +455,7 @@ protected void callDecode(ChannelHandlerContext ctx, ByteBuf in, List<Object> ou
}
} catch (DecoderException e) {
throw e;
} catch (Throwable cause) {
} catch (Exception cause) {
throw new DecoderException(cause);
}
}
Expand Down