@Override
    public void exceptionCaught(IoSession session, Throwable cause) throws Exception {
        com.github.ltsopensource.remoting.Channel channel = new MinaChannel(session);

        final String remoteAddress = RemotingHelper.parseChannelRemoteAddr(channel);
        LOGGER.warn("{}: exceptionCaught {}. ", sideType, remoteAddress, cause);

        if (remoting.getChannelEventListener() != null) {
            remoting.putRemotingEvent(new RemotingEvent(RemotingEventType.EXCEPTION, remoteAddress, channel));
        }

        RemotingHelper.closeChannel(channel);
    }
@author Robert HG (254963746@qq.com) on 11/6/15.
lts-core/src/main/java/com/github/ltsopensource/remoting/mina/MinaHandler.java