@Override
    public void sendException(Throwable ex) {
        if (isResponseSentAlready.compareAndSet(false, true)) {
            processor.sendResponseIfNecessary(
                this.ctx,
                cmd.getType(),
                processor.getCommandFactory().createExceptionResponse(this.cmd.getId(),
                    ResponseStatus.SERVER_EXCEPTION, ex));
        } else {
            throw new IllegalStateException("Should not send rpc response repeatedly!");
        }
    }
@see com.alipay.remoting.AsyncContext#sendException(java.lang.Throwable)
src/main/java/com/alipay/remoting/rpc/protocol/RpcAsyncContext.java