src/LdapTools/Operation/Invoker/LdapOperationInvokerTrait.php
protected function logExceptionAndThrow($exception, LogOperation $log = null)
    {
        if ($this->shouldLog($log) && is_null($log->getStartTime())) {
            $this->logStart($log);
        }
        if ($this->shouldLog($log)) {
            $log->setError($exception->getMessage());
        }

        throw $exception;
    }
protected function logExceptionAndThrow($exception, LogOperation $log = null)
    {
        if ($this->shouldLog($log) && is_null($log->getStartTime())) {
            $this->logStart($log);
        }
        if ($this->shouldLog($log)) {
            $log->setError($exception->getMessage());
        }

        throw $exception;
    }
protected function logExceptionAndThrow ( $ exception , LogOperation $ log = null ) { if ( $ this -> shouldLog ( $ log ) && is_null ( $ log -> getStartTime ( ) ) ) { $ this -> logStart ( $ log ) ; } if ( $ this -> shouldLog ( $ log ) ) { $ log -> setError ( $ exception -> getMessage ( ) ) ; } throw $ exception ; }
Handles exception error message logging if logging is enabled then re-throws the exception.

@param LogOperation|null $log
@param \Throwable|\Exception $exception
@throws \LdapTools\Exception\LdapConnectionException
Handles exception error message logging if logging is enabled then re - throws the exception .