mirror of
https://github.com/google/nomulus.git
synced 2025-05-13 07:57:13 +02: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:
parent
8a1c99e22b
commit
782643ce33
1 changed files with 3 additions and 2 deletions
|
@ -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(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue