Domain/BaseDomain.php
protected function flushTransactionException(\Exception $e, ConstraintViolationListInterface $violations, $object = null): void
    {
        if (null !== $this->connection && null === $object) {
            $this->connection->rollback();
        }

        if ($e instanceof ConstraintViolationException) {
            $violations->addAll($e->getConstraintViolations());
        } else {
            $message = DomainUtil::getExceptionMessage($this->translator, $e, $this->debug);

            $violations->add(new ConstraintViolation($message, $message, [], $object, null, null));
        }
    }
protected function flushTransactionException(\Exception $e, ConstraintViolationListInterface $violations, $object = null): void
    {
        if (null !== $this->connection && null === $object) {
            $this->connection->rollback();
        }

        if ($e instanceof ConstraintViolationException) {
            $violations->addAll($e->getConstraintViolations());
        } else {
            $message = DomainUtil::getExceptionMessage($this->translator, $e, $this->debug);

            $violations->add(new ConstraintViolation($message, $message, [], $object, null, null));
        }
    }
protected function flushTransactionException ( \ Exception $ e , ConstraintViolationListInterface $ violations , $ object = null ) : void { if ( null !== $ this -> connection && null === $ object ) { $ this -> connection -> rollback ( ) ; } if ( $ e instanceof ConstraintViolationException ) { $ violations -> addAll ( $ e -> getConstraintViolations ( ) ) ; } else { $ message = DomainUtil :: getExceptionMessage ( $ this -> translator , $ e , $ this -> debug ) ; $ violations -> add ( new ConstraintViolation ( $ message , $ message , [ ] , $ object , null , null ) ) ; } }
Do the action when there is an exception on flush transaction.

@param \Exception                       $e          The exception on flush transaction
@param ConstraintViolationListInterface $violations The constraint violation list
@param null|object                      $object     The resource for auto commit or null for flush at the end

@throws
Do the action when there is an exception on flush transaction .