def __call__(self, ex):
"""Re-raise any exception value not being filtered out.
If the exception was the last to be raised, it will be re-raised with
its original traceback.
"""
exc_type, exc_val, traceback = sys.exc_info()
try:
if not self._should_ignore_ex(ex):
if exc_val is ex:
six.reraise(exc_type, exc_val, traceback)
else:
raise ex
finally:
del exc_type, exc_val, traceback
评论列表
文章目录