made unexpected token exception more verbose
authorfabien <fabien@93ef8e89-cb99-4229-a87c-7fa0fa45744b>
Sun, 13 Dec 2009 08:12:07 +0000 (08:12 +0000)
committerfabien <fabien@93ef8e89-cb99-4229-a87c-7fa0fa45744b>
Sun, 13 Dec 2009 08:12:07 +0000 (08:12 +0000)
git-svn-id: http://svn.twig-project.org/trunk@158 93ef8e89-cb99-4229-a87c-7fa0fa45744b

lib/Twig/ExpressionParser.php

index 93ba541..d659045 100644 (file)
@@ -273,7 +273,7 @@ class Twig_ExpressionParser
         }
         else
         {
-          throw new Twig_SyntaxError('Unexpected token', $token->getLine());
+          throw new Twig_SyntaxError(sprintf('Unexpected token "%s"', $token->getValue()), $token->getLine());
         }
     }
     if (!$assignment)