Permalink
Browse files

a more helpful error message for TemplateNotFound (FileSystemLoader o…

…nly)
  • Loading branch information...
schettino72 committed Apr 11, 2012
1 parent a21f2ed commit 4c5d41e89368fabb783526e94d2b512a90506746
Showing with 2 additions and 1 deletion.
  1. +2 −1 jinja2/loaders.py
View
@@ -177,7 +177,8 @@ def uptodate():
except OSError:
return False
return contents, filename, uptodate
- raise TemplateNotFound(template)
+ message = "%s - search path:(%s)"
+ raise TemplateNotFound(message % (template, ", ".join(self.searchpath)))
def list_templates(self):
found = set()

0 comments on commit 4c5d41e

Please sign in to comment.