public Future<Void> executeFailed(ProcessingContext<T> context, Stage stage, Class<?> executingClass, Throwable error) {
        markAsFailed();
        context.currentContext(stage, executingClass);
        context.error(error);
        errorHandlingMetrics.recordFailure();
        Future<Void> errantRecordFuture = report(context);
        if (!withinToleranceLimits()) {
            errorHandlingMetrics.recordError();
            throw new ConnectException("Tolerance exceeded in error handler", error);
        }
        return errantRecordFuture;
    }
Inform this class that some external operation has already failed. This is used when the control flow does not
allow for the operation to be started and stopped within the scope of a single {@link Operation}, and the
{@link #execute(ProcessingContext, Operation, Stage, Class)} method cannot be used.

@param context The {@link ProcessingContext} used to hold state about this operation
@param stage The logical stage within the overall pipeline of the operation that has failed
@param executingClass The class containing the operation implementation that failed
@param error The error which caused the operation to fail
@return A future which resolves when this failure has been persisted by all {@link ErrorReporter} instances
@throws ConnectException if the operation is not tolerated, and the overall pipeline should stop
connect/runtime/src/main/java/org/apache/kafka/connect/runtime/errors/RetryWithToleranceOperator.java