From f63d478b9b122d0ed459af8f8843403bac4ddf08 Mon Sep 17 00:00:00 2001 From: fabien Date: Thu, 15 Oct 2009 05:17:06 +0000 Subject: [PATCH] enhanced filesystem loader error when a template is not found git-svn-id: http://svn.twig-project.org/trunk@54 93ef8e89-cb99-4229-a87c-7fa0fa45744b --- CHANGELOG | 1 + lib/Twig/Loader/Filesystem.php | 2 +- 2 files changed, 2 insertions(+), 1 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index d3cec98..fbb8ef9 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,5 +1,6 @@ * 0.9.2-DEV + * enhanced some error messages to ease debugging * fixed empty cache files when the template contains an error * 0.9.1 (2009-10-14) diff --git a/lib/Twig/Loader/Filesystem.php b/lib/Twig/Loader/Filesystem.php index 9ce3956..c262808 100644 --- a/lib/Twig/Loader/Filesystem.php +++ b/lib/Twig/Loader/Filesystem.php @@ -94,6 +94,6 @@ class Twig_Loader_Filesystem extends Twig_Loader return array(file_get_contents($file), filemtime($file)); } - throw new RuntimeException(sprintf('Unable to find template "%s".', $name)); + throw new RuntimeException(sprintf('Unable to find template "%s" (looked into: %s).', $name, implode(', ', $this->paths))); } } -- 1.7.2.5