mirror of
https://github.com/google/nomulus
synced 2026-01-11 08:20:27 +00:00
Log all exceptions thrown at the end of the pipeline
The RelayHandler is installed at the end of a channel pipeline (both frontend and backend). If it does not log the exception, it will be regarded and unhandled exception, which shows up in logs, but does not log the corresponding channel. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=208984756
This commit is contained in:
@@ -78,10 +78,11 @@ public class RelayHandler<I> extends SimpleChannelInboundHandler<I> {
|
||||
if (cause instanceof OverQuotaException) {
|
||||
logger.atWarning().withCause(cause).log(
|
||||
"Channel %s closed due to quota exceeded.", ctx.channel());
|
||||
ChannelFuture unusedFuture = ctx.close();
|
||||
} else {
|
||||
ctx.fireExceptionCaught(cause);
|
||||
logger.atWarning().withCause(cause).log(
|
||||
"Channel %s closed due to unexpected exception.", ctx.channel());
|
||||
}
|
||||
ChannelFuture unusedFuture = ctx.close();
|
||||
}
|
||||
|
||||
public static void writeToRelayChannel(
|
||||
|
||||
Reference in New Issue
Block a user