public final void exceptionCaught(IoSession session, Throwable cause) throws Exception {
ExceptionHandler<Throwable> handler = findExceptionHandler(cause.getClass());
if (handler != null) {
handler.exceptionCaught(session, cause);
} else {
throw new UnknownMessageTypeException(
"No handler found for exception type: " +
cause.getClass().getSimpleName());
}
}