protected function doExecuteInRepository(\Closure $cb)
    {
        try {
            return $cb($this->repository);
        } catch (\Exception $e) {
            throw Exception\Translator\Doctrine::translate($e);
        }
    }
protected function doExecuteInRepository(\Closure $cb)
    {
        try {
            return $cb($this->repository);
        } catch (\Exception $e) {
            throw Exception\Translator\Doctrine::translate($e);
        }
    }
protected function doExecuteInRepository ( \ Closure $ cb ) { try { return $ cb ( $ this -> repository ) ; } catch ( \ Exception $ e ) { throw Exception \ Translator \ Doctrine :: translate ( $ e ) ; } }
Executes something in the context of the entityRepository.

Exceptions are caught and translated.

@param Closure $cb The closure to execute, takes the entityRepository
@return mixed whatever the function returns, this method also returns
@throws \Caridea\Dao\Exception If a database problem occurs
@see \Caridea\Dao\Exception\Translator\Doctrine
Executes something in the context of the entityRepository .