otected @Nullable <T> T onException(@NotNull Exception e, @NotNull String actionName) {
    if (e instanceof ControlFlowException) {
      //noinspection CastConflictsWithInstanceof
      throw (RuntimeException)e;
    }

    LOG.error("an exception during " + actionName + " calculation", e);
    Throwable unwrapped = e instanceof RuntimeException ? e.getCause() : e;
    if (requireIndexRebuild(unwrapped)) {
      closeReaderIfNeeded(IndexCloseReason.AN_EXCEPTION);
    }
    return null;
  }


otected @Nullable <T> T onException(@NotNull Exception e, @NotNull String actionName) {