Browse Source

Merge remote branch 'weaverryan/template_locator_better_exception'

* weaverryan/template_locator_better_exception:
  [FrameworkBundle] Taking advantage of the known type of $template to render meaningfull information about the template
Fabien Potencier 14 years ago
parent
commit
0abeaf1a38

+ 1 - 1
src/Symfony/Bundle/FrameworkBundle/Templating/Loader/TemplateLocator.php

@@ -60,7 +60,7 @@ class TemplateLocator implements FileLocatorInterface
         try {
             return $this->cache[$key] = $this->locator->locate($template->getPath(), $this->path);
         } catch (\InvalidArgumentException $e) {
-            throw new \InvalidArgumentException(sprintf('Unable to find template "%s" in "%s".', json_encode($template), $this->path), 0, $e);
+            throw new \InvalidArgumentException(sprintf('Unable to find template "%s" in "%s".', $template->getPath(), $this->path), 0, $e);
         }
     }
 }