code: public synchronized void onError(final Throwable exception) {
  
      LOG.entering(CLASS_NAME, "onError", exception);
  
      if (this.isClosing()) {
        LOG.log(Level.WARNING, "Received an exception while already in shutdown.", exception);
      } else {
        LOG.log(Level.WARNING, "Shutting down the Driver with an exception: ", exception);
        this.shutdownCause = Optional.of(exception);
        this.clock.stop(exception);
        this.setStatus(DriverStatus.FAILING);
      }
  
      LOG.exiting(CLASS_NAME, "onError", exception);
    }
docs: End the Driver with an exception.
  @param exception Exception that causes the driver shutdown.