summaryrefslogtreecommitdiff
path: root/jinja2/debug.py
diff options
context:
space:
mode:
authorArmin Ronacher <armin.ronacher@active-4.com>2011-04-18 16:27:14 +0200
committerArmin Ronacher <armin.ronacher@active-4.com>2011-04-18 16:27:14 +0200
commit75ffeb6b022b6bcccfd75ea2b20418db6623cde9 (patch)
tree003515dc46b64ede43b36f115c2580dad3a6210a /jinja2/debug.py
parentda63262f0ec0fb51703bb4b516e70e7444c615b6 (diff)
downloadjinja2-75ffeb6b022b6bcccfd75ea2b20418db6623cde9.tar.gz
Catch down errors caused by tb_set_next. This fixes #22
Diffstat (limited to 'jinja2/debug.py')
-rw-r--r--jinja2/debug.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/jinja2/debug.py b/jinja2/debug.py
index f1cc3bc..2af2222 100644
--- a/jinja2/debug.py
+++ b/jinja2/debug.py
@@ -45,7 +45,13 @@ class TracebackFrameProxy(object):
def set_next(self, next):
if tb_set_next is not None:
- tb_set_next(self.tb, next and next.tb or None)
+ try:
+ tb_set_next(self.tb, next and next.tb or None)
+ except Exception:
+ # this function can fail due to all the hackery it does
+ # on various python implementations. We just catch errors
+ # down and ignore them if necessary.
+ pass
self._tb_next = next
@property