docs: private Long runErrorHooks(EDBCommit commit, EDBException exception) throws EDBException {
          for (EDBErrorHook hook : errorHooks) {
              try {
                  EDBCommit newCommit = hook.onError(commit, exception);
                  if (newCommit != null) {
                      return commit(newCommit);
                  }
              } catch (ServiceUnavailableException e) {
                  // Ignore
              } catch (EDBException e) {
                  exception = e;
                  break;
              } catch (Exception e) {
                  logger.error("Error while performing EDBErrorHook", e);
              }
          }
          throw exception;
      }