Permalink
Browse files

Adding exception handler

  • Loading branch information...
1 parent 79817d5 commit ede055af92831b4be9313c470d8c615a97e7d157 Carl Whittaker committed Jan 27, 2011
Showing with 3 additions and 0 deletions.
  1. +3 −0 pystache/template.py
View
3 pystache/template.py
@@ -61,6 +61,9 @@ def _render_sections(self, template, view):
it = self.view.get(section_name, None)
replacer = ''
+ # Exception
+ if it and isinstance(it, Exception):
+ raise it
# Callable
if it and isinstance(it, collections.Callable):
replacer = it(inner)

0 comments on commit ede055a

Please sign in to comment.