protected function attempt(Closure $run, $query='')
    {
        try {
            return $run();
        } catch (Exception $e) {
            throw $this->convertException($e, $query);
        }
    }
protected function attempt(Closure $run, $query='')
    {
        try {
            return $run();
        } catch (Exception $e) {
            throw $this->convertException($e, $query);
        }
    }
protected function attempt ( Closure $ run , $ query = '' ) { try { return $ run ( ) ; } catch ( Exception $ e ) { throw $ this -> convertException ( $ e , $ query ) ; } }
Try to perform an operation. If it fails convert the native exception
into a SQLException.

@param Closure $run
@param string $query

@return mixed
Try to perform an operation . If it fails convert the native exception into a SQLException .