code: public void onMainExecutionComplete(Throwable t) {
          try {
              // May be called twice, don't do anything the second time
              if (mainExecutionComplete) {
                  return;
              }
              mainExecutionComplete = true;
  
              this.failure = t;
  
              onAttemptComplete(t);
  
              if (t instanceof CircuitBreakerOpenException) {
                  // We didn't run anything, execution context needs closing
                  close();
              }
  
              if (retry != null) {
                  if (retry.canRetryFor(null, t)) {
                      // This is a retryable failure
                      metricRecorder.incrementRetryCallsFailureCount();
                  } else {
                      // Not a retryable failure
                      if (retries > 0) {
                          metricRecorder.incrementRetryCallsSuccessRetriesCount();
                      } else {
                          metricRecorder.incrementRetryCallsSuccessImmediateCount();
                      }
                  }
              }
          } catch (Exception e) {
              // Unchecked exceptions thrown here can be swallowed by Failsafe
              // This catch ensures we at least get an FFDC
              throw e;
          }
  
      }
docs: Called when all processing except fallback has occurred
  <p>
  May be called twice (before fallback and after fallback) but will only process the event the first time
  
  @param t the exception thrown, or {@code null} if no exception thrown