Work effectively with AI coding agents. Understand them as language models running in a tool loop with limited context, which is why they guess, game the visible signal and report confidently. Recognise the shortcut and correctness tells in their code across Python, TypeScript/JavaScript, Rust, Java and Go, and know the damage each one does later. Verify changes instead of trusting them, review diffs fast for quality and security, judge when work is truly finished, and choose, design and steer tasks so agents can finish them well.
Errors swallowed by catch-all handlers card 3 of 6

The swallow tells, language by language

builds on: Error handling idioms across languages, Agents optimise the signal they can see
- Python: `except Exception: pass`, or bare `except:`, which also catches `KeyboardInterrupt` - JS/TS: `catch (e) {}`, `catch {}`, `.catch(() => {})` - Java: `catch (Exception e) { e.printStackTrace(); }` prints to stderr, then the method carries on as if it succeeded - Go: `_ = err`, or `if err != nil { return nil }`, which reports success - Rust: `.ok()` or `let _ =`, which drop the error value Ask of each one: who learns it failed, and what was already written?
Terms on this card
KeyboardInterrupt
Python exception raised by Ctrl+C. It is not a subclass of `Exception`, but a bare `except:` still catches it.
bare `except:`
A Python `except` with no exception type. It catches everything, including `KeyboardInterrupt` and `SystemExit`.
stderr
The standard error output stream. In production it is often unread or unalerted, so printing there is not handling an error.
printStackTrace
Java method that writes an exception and its call chain to stderr. It does not stop execution or tell the caller anything.
nil
Go's zero value for pointers, interfaces and errors. A `nil` error means "no error", i.e. success.
Learn this step by step on Bytewise
Lesson goal: Spot `except Exception: pass`, an empty `catch (e) {}`, Java's `catch (Exception e) { e.printStackTrace(); }`, Go's `_ = err` or `if err != nil { return nil }`, and Rust's `.ok()` discarding errors. Explain the later cost: failures become invisible and state is left half-updated. · the whole lesson