Merge branch 'master' of alkmene.hbz-nrw.de:joerg/netty-http
This commit is contained in:
commit
38d45986ac
1 changed files with 3 additions and 2 deletions
|
@ -92,9 +92,10 @@ public class HttpPipeliningHandler extends ChannelDuplexHandler {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) {
|
public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) {
|
||||||
logger.log(Level.SEVERE, cause.getMessage(), cause);
|
String message = cause.getMessage() == null ? "null" : cause.getMessage();
|
||||||
|
logger.log(Level.SEVERE, message, cause);
|
||||||
ctx.writeAndFlush(new DefaultFullHttpResponse(HttpVersion.HTTP_1_1,
|
ctx.writeAndFlush(new DefaultFullHttpResponse(HttpVersion.HTTP_1_1,
|
||||||
HttpResponseStatus.INTERNAL_SERVER_ERROR,
|
HttpResponseStatus.INTERNAL_SERVER_ERROR,
|
||||||
Unpooled.copiedBuffer(cause.getMessage().getBytes(StandardCharsets.UTF_8))));
|
Unpooled.copiedBuffer(message.getBytes(StandardCharsets.UTF_8))));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue