Java 类net.minecraft.util.io.netty.handler.timeout.TimeoutException 实例源码

项目:CraftBukkit    文件:NetworkManager.java   
public void exceptionCaught(ChannelHandlerContext channelhandlercontext, Throwable throwable) {
    ChatMessage chatmessage;

    if (throwable instanceof TimeoutException) {
        chatmessage = new ChatMessage("disconnect.timeout", new Object[0]);
    } else {
        chatmessage = new ChatMessage("disconnect.genericReason", new Object[] { "Internal Exception: " + throwable});
    }

    this.close(chatmessage);
}
项目:Tweakkit-Server    文件:NetworkManager.java   
public void exceptionCaught(ChannelHandlerContext channelhandlercontext, Throwable throwable) {
    ChatMessage chatmessage;

    if (throwable instanceof TimeoutException) {
        chatmessage = new ChatMessage("disconnect.timeout", new Object[0]);
    } else {
        chatmessage = new ChatMessage("disconnect.genericReason", new Object[] { "Internal Exception: " + throwable});
    }

    this.close(chatmessage);
    if (MinecraftServer.getServer().isDebugging()) throwable.printStackTrace(); // Spigot
}