protected function processTwig(Exception $exception)
    {
        // Must be a Twig related exception
        if (!$exception instanceof Twig_Error) {
            return false;
        }

        $this->message = $exception->getRawMessage();
        $this->line = $exception->getTemplateLine();

        // Find where the twig markup section begins
        $offsetArray = SectionParser::parseOffset($this->compoundObject->getContent());
        $this->line += $offsetArray['markup'];

        // Account for line 0
        $this->line--;

        return true;
    }
protected function processTwig(Exception $exception)
    {
        // Must be a Twig related exception
        if (!$exception instanceof Twig_Error) {
            return false;
        }

        $this->message = $exception->getRawMessage();
        $this->line = $exception->getTemplateLine();

        // Find where the twig markup section begins
        $offsetArray = SectionParser::parseOffset($this->compoundObject->getContent());
        $this->line += $offsetArray['markup'];

        // Account for line 0
        $this->line--;

        return true;
    }
protected function processTwig ( Exception $ exception ) { // Must be a Twig related exception if ( ! $ exception instanceof Twig_Error ) { return false ; } $ this -> message = $ exception -> getRawMessage ( ) ; $ this -> line = $ exception -> getTemplateLine ( ) ; // Find where the twig markup section begins $ offsetArray = SectionParser :: parseOffset ( $ this -> compoundObject -> getContent ( ) ) ; $ this -> line += $ offsetArray [ 'markup' ] ; // Account for line 0 $ this -> line -- ; return true ; }
Override properties of an exception specific to the Twig section
of a CMS object.
@param \Exception $exception The exception to modify.
@return bool
Override properties of an exception specific to the Twig section of a CMS object .