Commits

Andriy Kornatskyy  committed 4bcac17

If there is no rule to build a token show a line number.

  • Participants
  • Parent commits 116e53e

Comments (0)

Files changed (1)

File src/wheezy/template/builder.py

                 if rule(self, lineno, token, value):
                     break
         else:
-            raise ValueError('No rule to build "%s" token.' % token)
+            raise ValueError('No rule to build "%s" token at line %d.' %
+                    (token, lineno))
 
     def to_string(self):
         return '\n'.join(self.buf)