Exceptionally Bad: The Misuse of Exceptions in C++ & How to Do Better
summary
Claims that C++ exceptions get misused in resource management, retries, hierarchies, data passing and control flow and that fixing them needs concrete patterns not platitudes. Demonstrates actual replacements: RAII over catch handlers for cleanup, return expected/optional for shallow returns instead of loop-retries, a simple single templated exception class (Omega) with mutable logging in exception objects plus source_location and stack traces. Shows these tools reduce class explosion, make logs actionable, and keeps exceptions for rare, serious, transactional or deep-unwind cases.
AI-written summary · about
chapters (22)
- 0:00Introduction
- 2:12What this talk will cover
- 3:18C++ exception misconceptions
- 10:38How exceptions work
- 16:34Exception safety guarantees
- 17:59Exception philosophy
- 25:02Real-world misuse
- 25:24Resource management patterns
- 27:33Retry mechanisms
- 30:01Pass-the-buck anti-pattern
- 33:30Logging and context passing
- 37:04Error detection alternatives
- 39:34Data passing to handlers
- 41:42Exception class pitfalls
- 43:30Control flow patterns
- 46:20Exception hierarchy flaws
- 53:24Simplifying with base classes
- 53:45Stack unwinding scenarios
- 55:50Truly exceptional use cases
- 56:11Omega exception class
- 59:46Proper exception use
- 1:00:10Q&A








