Handle exceptions gracefully

Handle exceptions gracefully in C++ — with the four heights of help laid out: do it now, make it easier for the next person to accept, work out the right move when you are stuck, and learn the pattern so it stops coming back.

4prompt heights
Open it in the interactive atlas →

The four heights

The same task, four distances: today's deadline, the next reviewer, the stuck moment, the pattern.

Execute — do the immediate task

+
Make exception handling consistent and safe across the codebase. Audit hotpaths and library…
Make exception handling consistent and safe across the codebase. Audit hotpaths and library boundaries, add try-catch only where the code can recover or must translate exceptions into error codes, ensure destructors are noexcept, and add unit tests for thrown exceptions. Update the coding guide with rules for when to throw, when to catch, and how to propagate errors across threads and through the C API.

Improve — make it easier to accept

+
Before I roll this out, surface the parts that matter to reviewers: list the modules where…
Before I roll this out, surface the parts that matter to reviewers: list the modules where exceptions were added or removed, show example call stacks where an uncaught exception could crash the app, and flag places where third-party code throws nonstandard exception types. Suggest minimal test cases reviewers should run to prove behavior is unchanged.

Decide — diagnose the stuck moment

+
We just lost a game server because an exception on a worker thread escaped and terminated the…

A background thread's exception killed the process in production.

We just lost a game server because an exception on a worker thread escaped and terminated the process. The codebase mixes exceptions and error codes and I cannot find where the thread's work did not catch errors. What are the most likely points of failure to inspect now, what quick code change will prevent process-wide termination while I trace the root cause, and how should I communicate this to ops so they can restart safely?

Become — change the pattern

+
Across releases we fix crashes by sprinkling try-catch blocks, which slows reviews and leaves…

We keep patching crashes from uncaught exceptions in different ad hoc ways.

Across releases we fix crashes by sprinkling try-catch blocks, which slows reviews and leaves inconsistent semantics. Recommend one habit and one repo-level rule that will standardize exception usage, reduce regressions from uncaught exceptions, and make post-crash behavior predictable for players and ops.

Next to this one

Other programming language work people do in C++.

Every task here came from the work, not from a feature list — which is why the prompts name what you want done and never the button that does it. The tool changes; the work does not.
Copyright © LLOS.ai · 2026 — original pedagogy, voice, and design — all rights reserved.

The rest of the map

Same library, five ways in.