fixed wrong exception class in the filesystem loader
authorFabien Potencier <fabien.potencier@gmail.com>
Thu, 18 Oct 2012 06:34:35 +0000 (08:34 +0200)
committerFabien Potencier <fabien.potencier@gmail.com>
Thu, 18 Oct 2012 06:36:07 +0000 (08:36 +0200)
lib/Twig/Loader/Filesystem.php

index eb9c7cd..6b7f5ff 100644 (file)
@@ -163,7 +163,7 @@ class Twig_Loader_Filesystem implements Twig_LoaderInterface
         $namespace = '__main__';
         if (isset($name[0]) && '@' == $name[0]) {
             if (false === $pos = strpos($name, '/')) {
-                throw new InvalidArgumentException(sprintf('Malformed namespaced template name "%s" (expecting "@namespace/template_name").', $name));
+                throw new Twig_Error_Loader(sprintf('Malformed namespaced template name "%s" (expecting "@namespace/template_name").', $name));
             }
 
             $namespace = substr($name, 1, $pos - 1);