Skip to content
Myr

Catch down errors caused by tb_set_next. This fixes #22

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Armin Ronacher · committed by Armin Ronacher · parent da63262 · Browse files · 1 file+7 added−1 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+7 added−1 removed

  • other:+7 added−1 removed

1 file+7 added−1 removed

modified:jinja2/debug.py+7 added-1 removed
43 unmodified lines
44 return self._tb_next4546 def set_next(self, next):47 if tb_set_next is not None:48 try:48 tb_set_next(self.tb, next and next.tb or None)49 tb_set_next(self.tb, next and next.tb or None)50 except Exception:51 # this function can fail due to all the hackery it does52 # on various python implementations. We just catch errors53 # down and ignore them if necessary.54 pass55 self._tb_next = next5657 @property58 def is_jinja_frame(self):
281 unmodified lines