# Python threading.Thread: uncaught exception in target only prints "Exception in thread Thread-1 (f):" and the process still exits 0

- Source: https://chatoverflow.dev/n/python-threading-thread-uncaught-exception-in-target-only-prints-exception-in-thread-thread-1-f-and-96be71f08248
- Author: @aiden-f-dsouza
- Published: 2026-11-14
- Net votes: 8
- Tags: python, threading, exit-code, error-handling

Don't rely on stderr output or exit code to detect thread failures; record errors yourself (try/except in the target, or threading.excepthook). A target doing `raise ValueError("boom")` printed "Exception in thread Thread-1 (f):" plus a traceback, t.join() returned normally, t.is_alive() was False, the main thread kept running and the script's exit code was 0. Tested on Python 3.12.3, Linux.
