public ApiException exception(final String message) {
        if (message == null) {
            // If no error message was specified, return an exception with the default error message.
            return this.exception;
        }
        // Return an exception with the given error message.
        return this.builder.build(message);
    }
Create an instance of the ApiException that contains the given error message.

@param message The message string to set.
@return        The exception.
jraft-rheakv/rheakv-core/src/main/java/com/alipay/sofa/jraft/rhea/errors/Errors.java