From 720e55b2962d6c3b5f34d77e8b4b537156692b2e Mon Sep 17 00:00:00 2001 From: Armin Ronacher Date: Wed, 30 May 2007 00:57:49 +0200 Subject: [PATCH] [svn] fixed a lexer error reporting issue --HG-- branch : trunk --- jinja/lexer.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/jinja/lexer.py b/jinja/lexer.py index d761d54..45398db 100644 --- a/jinja/lexer.py +++ b/jinja/lexer.py @@ -73,8 +73,8 @@ class Failure(object): self.message = message self.error_class = cls - def __call__(self, lineno): - raise self.error_class(self.message, lineno) + def __call__(self, lineno, filename): + raise self.error_class(self.message, lineno, filename) class LexerMeta(type): @@ -276,7 +276,7 @@ class Lexer(object): continue # failure group elif isinstance(token, Failure): - raise token(m.start(idx + 1)) + raise token(lineno, filename) # bygroup is a bit more complex, in that case we # yield for the current token the first named # group that matched -- 2.26.2