class_docstr: Wraps an exception plus traceback to communicate across threads
docstr: Reraises the wrapped exception in the current thread
docstr_tok: ["Reraises","the","wrapped","exception","in","the","current","thread"]
code: def reraise(self):
      r"""Reraises the wrapped exception in the current thread"""
      # Format a message such as: "Caught ValueError in DataLoader worker
      # process 2. Original Traceback:", followed by the traceback.
      msg = "Caught {} {}.\nOriginal {}".format(
          self.exc_type.__name__, self.where, self.exc_msg
      )
      if self.exc_type == KeyError:
          # KeyError calls repr() on its argument (usually a dict key). This
          # makes stack traces unreadable. It will not be changed in Python
          # (https://bugs.python.org/issue2651), so we work around it.
          msg = KeyErrorMessage(msg)
      elif getattr(self.exc_type, "message", None):
          # Some exceptions have first argument as non-str but explicitly
          # have message field
          raise self.exc_type(message=msg)
      try:
          exception = self.exc_type(msg)
      except TypeError:
          # If the exception takes multiple arguments, don't try to
          # instantiate since we don't know how to
          raise RuntimeError(msg) from None
      raise exception
  
file_path: dgl/python/dgl/utils/exception.py
imports: import sys
  import traceback
label_desc: Use image node_id 2 for calling the ExceptionWrapper obj's underlying member method code with example usage: obj.reraise() without return types