@Override
    public RpcResponseCommand createExceptionResponse(int id, final Throwable t, String errMsg) {
        RpcResponseCommand response = null;
        if (null == t) {
            response = new RpcResponseCommand(id, createServerException(errMsg));
        } else {
            response = new RpcResponseCommand(id, createServerException(t, errMsg));
        }
        response.setResponseClass(RpcServerException.class.getName());
        response.setResponseStatus(ResponseStatus.SERVER_EXCEPTION);
        return response;
    }
command factory for rpc protocol

@author tsui
@version $Id: RpcCommandFactory.java, v 0.1 2018-03-27 21:37 tsui Exp $
src/main/java/com/alipay/remoting/rpc/RpcCommandFactory.java