a more helpful error message for TemplateNotFound (FileSystemLoader only...) #116

Closed
wants to merge 1 commit into from
View
3 jinja2/loaders.py
@@ -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()