parameters: (self)
docstring: Reraise the caught exception in the main thread/process
docstring_summary: Reraise the caught exception in the main thread/process
docstring_tokens: Reraise the caught exception in the main thread / process
function: def reraise(self):
          """Reraise the caught exception in the main thread/process"""
          # Error message like: "Caught ValueError in GeneratorDataset worker process. Original Traceback:".
          err_msg = "Caught {} {}.\nOriginal {}".format(
              self.except_type.__name__, self.where, self.except_msg)
          if self.except_type == KeyError:
              # As KeyError will call its repr() function automatically, which makes stack info hard to read.
              err_msg = KeyErrorParse(err_msg)
          elif hasattr(self.except_type, "message"):
              raise self.except_type(message=err_msg)
          raise self.except_type(err_msg)
function_tokens: def reraise ( self ) : # Error message like: "Caught ValueError in GeneratorDataset worker process. Original Traceback:". err_msg = "Caught {} {}.\nOriginal {}" . format ( self . except_type . __name__ , self . where , self . except_msg ) if self . except_type == KeyError : # As KeyError will call its repr() function automatically, which makes stack info hard to read. err_msg = KeyErrorParse ( err_msg ) elif hasattr ( self . except_type , "message" ) : raise self . except_type ( message = err_msg ) raise self . except_type ( err_msg )