class_docstr: Thread subclass that captures unhandled exceptions.
class_docstr_tok: ["Thread","subclass","that","captures","unhandled","exceptions","."]
docstr: If the thread target raised an unhandled exception, re-raise it.
  Otherwise no-op.
docstr_tok: ["If","the","thread","target","raised","an","unhandled","exception",",","re-raise","it",".","Otherwise","no-op","."]
code: def assert_no_unhandled_exception(self) -> None:
      """If the thread target raised an unhandled exception, re-raise it.
      Otherwise no-op.
      """
      if self._unhandled_exception is not None:
          raise RuntimeError(
              f"Unhandled exception in thread '{self.name}'"
          ) from self._unhandled_exception
  
file_path: streamlit/lib/tests/exception_capturing_thread.py
imports: import threading
  from typing import Any, Callable, Optional
  from streamlit.runtime.forward_msg_queue import ForwardMsgQueue
  from streamlit.runtime.memory_uploaded_file_manager import MemoryUploadedFileManager
  from streamlit.runtime.scriptrunner import ScriptRunContext, add_script_run_ctx
  from streamlit.runtime.state import SafeSessionState, SessionState
label_desc: Use image node_id 3 for calling the ExceptionCapturingThread obj's underlying member method code with example usage: obj.assert_no_unhandled_exception() without return types