code: private EDBException runPreCommitHooks(EDBCommit commit) {
          EDBException exception = null;
          for (EDBPreCommitHook hook : preCommitHooks) {
              try {
                  hook.onPreCommit(commit);
              } catch (ServiceUnavailableException e) {
                  // Ignore
              } catch (EDBException e) {
                  exception = e;
                  break;
              } catch (Exception e) {
                  logger.error("Error while performing EDBPreCommitHook", e);
              }
          }
          return exception;
      }
docs: Runs all registered pre commit hooks on the EDBCommit object. Logs exceptions which occurs in the hooks, except
  for ServiceUnavailableExceptions and EDBExceptions. If an EDBException occurs, the function returns this
  exception.