From 5799a889c03e38a2c6d0b475194ab8c0b8904487 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Mon, 16 Apr 2012 09:04:57 +0200 Subject: [PATCH] added missing parameters to Twig_Error_Syntax --- lib/Twig/Lexer.php | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/Twig/Lexer.php b/lib/Twig/Lexer.php index 4958cb6..4d0ba9f 100644 --- a/lib/Twig/Lexer.php +++ b/lib/Twig/Lexer.php @@ -223,7 +223,7 @@ class Twig_Lexer implements Twig_LexerInterface $this->moveCursor($match[0]); if ($this->cursor >= $this->end) { - throw new Twig_Error_Syntax(sprintf('Unexpected end of file: Unclosed "%s"', $this->state === self::STATE_BLOCK ? 'block' : 'variable')); + throw new Twig_Error_Syntax(sprintf('Unexpected end of file: Unclosed "%s"', $this->state === self::STATE_BLOCK ? 'block' : 'variable'), $this->lineno, $this->filename); } } @@ -287,7 +287,7 @@ class Twig_Lexer implements Twig_LexerInterface protected function lexRawData() { if (!preg_match($this->regexes['lex_raw_data'], $this->code, $match, PREG_OFFSET_CAPTURE, $this->cursor)) { - throw new Twig_Error_Syntax(sprintf('Unexpected end of file: Unclosed "block"')); + throw new Twig_Error_Syntax(sprintf('Unexpected end of file: Unclosed "block"'), $this->lineno, $this->filename); } $text = substr($this->code, $this->cursor, $match[0][1] - $this->cursor); -- 1.7.2.5