code: public void         takeException(Exception exception) throws Exception
      {
          Preconditions.checkState(Thread.currentThread().equals(ourThread), "Not in the correct thread");
  
          boolean     passUp = true;
          if ( sessionHasFailed.get() )
          {
              switch ( mode )
              {
                  case RETRY:
                  {
                      sessionHasFailed.set(false);
                      failedSessionThreads.remove(ourThread);
                      if ( exception instanceof SessionFailedException )
                      {
                          isDone.set(false);
                          passUp = false;
                      }
                      break;
                  }
  
                  case FAIL:
                  {
                      break;
                  }
              }
          }
  
          if ( passUp )
          {
              retryLoop.takeException(exception);
          }
      }
docs: Pass any caught exceptions here
  
  @param exception the exception
  @throws Exception if not retry-able or the retry policy returned negative