예제 #1
0
 def try_and_panic_by_hand(self):
     try:
         self.line_of_primary_exc = inspect.currentframe().f_lineno + 1
         raise ValueError("primary")
     except Exception:
         exc_type, exc_value, traceback = sys.exc_info()
         try:
             raise RuntimeError("secondary")
         except Exception:
             pass
         raise_(exc_type, exc_value, traceback)
예제 #2
0
파일: threading.py 프로젝트: tmooney/toil
 def join(self, *args: Optional[float], **kwargs: Optional[float]) -> None:
     super().join(*args, **kwargs)
     if not self.is_alive() and self.exc_info is not None:
         exc_type, exc_value, traceback = self.exc_info
         self.exc_info = None
         raise_(exc_type, exc_value, traceback)
예제 #3
0
 def join(self, *args, **kwargs):
     super(ExceptionalThread, self).join(*args, **kwargs)
     if not self.is_alive() and self.exc_info is not None:
         exc_type, exc_value, traceback = self.exc_info
         self.exc_info = None
         raise_(exc_type, exc_value, traceback)