code: protected void recoverFromException(final String curQueue, final Exception ex) {
          final RecoveryStrategy recoveryStrategy = this.exceptionHandlerRef.get().onException(this, ex, curQueue);
          switch (recoveryStrategy) {
          case RECONNECT:
              LOG.info("Reconnecting to Redis in response to exception", ex);
              final int reconAttempts = getReconnectAttempts();
              if (!JedisUtils.reconnect(this.jedis, reconAttempts, RECONNECT_SLEEP_TIME)) {
                  LOG.warn("Terminating in response to exception after " + reconAttempts + " to reconnect", ex);
                  end(false);
              } else {
                  authenticateAndSelectDB();
                  LOG.info("Reconnected to Redis");
                  try {
                      loadRedisScripts();
                  } catch (IOException e) {
                      LOG.error("Failed to reload Lua scripts after reconnect", e);
                  }
              }
              break;
          case TERMINATE:
              LOG.warn("Terminating in response to exception", ex);
              end(false);
              break;
          case PROCEED:
              this.listenerDelegate.fireEvent(WORKER_ERROR, this, curQueue, null, null, null, ex);
              break;
          default:
              LOG.error("Unknown RecoveryStrategy: " + recoveryStrategy
                      + " while attempting to recover from the following exception; worker proceeding...", ex);
              break;
          }
      }
docs: Handle an exception that was thrown from inside {@link #poll()}.
  
  @param curQueue the name of the queue that was being processed when the exception was thrown
  @param ex the exception that was thrown