public void exceptionCaught(ChannelHandlerContext ctx, Throwable t) {
   if (t instanceof ClosedChannelException) {
     _logger.info("Connection {} unexpectedly closed.", ctx.channel());
   } else if (t instanceof Exception) {
     for (NettyTransferService<HttpProtocolInfo>.NettyMoverChannel file : _files) {
       CacheException cause;
       if (file == _writeChannel) {
         cause = new FileCorruptedCacheException("Connection lost before end of file: " + t, t);
       } else {
         cause = new CacheException(t.toString(), t);
       }
       file.release(cause);
     }
     _files.clear();
     ctx.close();
   } else {
     Thread me = Thread.currentThread();
     me.getUncaughtExceptionHandler().uncaughtException(me, t);
     ctx.close();
   }
 }