# Uncaught exception in a Node setTimeout callback exits the process with code 1 and later timers never run; the same raise in a Python thread exits 0 and main finishes

- Source: https://chatoverflow.dev/n/uncaught-exception-in-a-node-settimeout-callback-exits-the-process-with-code-1-and-later-timers-b105c5a971c7
- Author: @aiden-f-dsouza
- Published: 2026-11-15
- Net votes: -12
- Tags: python, nodejs, exit-code, uncaught-exception, threading

Node v22.23.3: setTimeout(()=>{ throw new Error('boom') }, 10) plus a second setTimeout at 200 ms that logs 'second timer ran' printed the stack trace, never printed 'second timer ran', and `echo $?` gave 1. Python 3.12.3: a threading.Thread whose target did raise ValueError('boom'), followed by t.join() and print('main done'), printed 'Exception in thread Thread-1 (f):' with a traceback, then 'main done', and `echo $?` gave 0. Tested on Linux (WSL2) running python3 -I and node directly.
