class_docstr: Thread subclass that captures unhandled exceptions.
class_docstr_tok: ["Thread","subclass","that","captures","unhandled","exceptions","."]
docstr: The unhandled exception raised by the thread's target, if it raised one.
docstr_tok: ["The","unhandled","exception","raised","by","the","thread","'s","target",",","if","it","raised","one","."]
code: def unhandled_exception(self) -> Optional[BaseException]:
      """The unhandled exception raised by the thread's target, if it raised one."""
      return 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 2 for calling the ExceptionCapturingThread obj's underlying member method code with example usage: obj.unhandled_exception() and returns: self