code: private void handleException(final Exception e) {
      // make sure only one scanner can set the exception
      countdown.countDown();
      if (exception == null) {
        synchronized (this) {
          if (exception == null) {
            exception = e;
            // fail once and fast on the first scanner to throw an exception
            try {
              mergeAndReturnResults();
            } catch (Exception ex) {
              LOG.error("Failed merging and returning results, "
                  + "calling back with exception", ex);
              results.callback(ex);
            }
          } else {
            // TODO - it would be nice to close and cancel the other scanners but
            // for now we have to wait for them to finish and/or throw exceptions.
            LOG.error("Another scanner threw an exception", e);
          }
        }
      }
    }
docs: If one or more of the scanners throws an exception then we should close it
  and pass the exception here so that we can catch and return it to the
  caller. If all of the scanners have finished, this will callback to the
  caller immediately.
  @param e The exception to store.