added a way for template name to be anything
authorFabien Potencier <fabien.potencier@gmail.com>
Sun, 6 Feb 2011 20:09:23 +0000 (21:09 +0100)
committerFabien Potencier <fabien.potencier@gmail.com>
Sun, 6 Feb 2011 20:09:23 +0000 (21:09 +0100)
lib/Twig/Error.php

index fad3957..e85c587 100644 (file)
@@ -112,7 +112,7 @@ class Twig_Error extends Exception
         $this->message = $this->rawMessage;
 
         if (null !== $this->filename) {
-            $this->message .= sprintf(' in %s', $this->filename);
+            $this->message .= sprintf(' in %s', json_encode($this->filename));
         }
 
         if ($this->lineno >= 0) {