@Override
    public boolean onError(final RaftException error) {
        if (!this.error.getStatus().isOk()) {
            LOG.warn("FSMCaller already in error status, ignore new error.", error);
            return false;
        }
        final OnErrorClosure c = new OnErrorClosure(error);
        return enqueueTask((task, sequence) -> {
            task.type = TaskType.ERROR;
            task.done = c;
        });
    }
Closure runs with an error.
@author boyan (boyan@alibaba-inc.com)

2018-Apr-04 2:20:31 PM
jraft-core/src/main/java/com/alipay/sofa/jraft/core/FSMCallerImpl.java