code: protected void setException(Throwable t) {
          if (U.compareAndSwapInt(this, STATE, NEW, COMPLETING)) {
              outcome = t;
              U.putOrderedInt(this, STATE, EXCEPTIONAL); // final state
              finishCompletion();
          }
      }
docs: Causes this future to report an {@link ExecutionException}
  with the given throwable as its cause, unless this future has
  already been set or has been cancelled.
  
  <p>This method is invoked internally by the {@link #run} method
  upon failure of the computation.
  
  @param t the cause of failure