A Framework for Classifying Programming Exceptions: Fatal, Boneheaded, Vexing, and Exogenous
By
CGamesPlay
Lightly toasted, lightly seasoned, mostly correct.
Summary
This article presents a framework for classifying exceptions in programming into four categories: fatal exceptions (unpreventable system failures like out of memory), boneheaded exceptions (programmer errors that should be prevented), vexing exceptions (design flaws where methods throw exceptions in normal scenarios), and exogenous exceptions (external factors beyond program control). The author argues that understanding these categories helps developers implement more effective error handling strategies.
Key quotes
· 5 pulledWriting good error handling code is hard in any language, whether you have exception handling or not.
Fatal exceptions are not your fault, you cannot prevent them, and you cannot sensibly clean up from them.
Boneheaded exceptions are your own darn fault, you could have prevented them and therefore they are bugs in your code.
Vexing exceptions are the result of unfortunate design decisions.
Exogenous exceptions appear to be somewhat like boneheaded exceptions except that they are not the result of a bug.
You might also wanna read
Follow-up Analysis: The Cost of Algebraic Data Types for Error Handling
This article is a follow-up to a previous piece on strongly typed error codes, addressing the common argument that using algebraic data type
Why Average LLM Use Is Likely Destroying Value in Software Development
The author argues that, contrary to prevailing hype, the average use of Large Language Models (LLMs) is likely destroying value rather than
How AI Accelerated Prototyping: From Idea to Tangible in Record Time
The author reflects on how AI has transformed their prototyping workflow. Previously, the biggest bottleneck was the time needed to scaffold
GitLab 19.0 launches with Secrets Manager, agentic workflows, and self-hosted AI models
GitLab 19.0 has been released, positioning itself as an intelligent orchestration platform for DevSecOps. The release includes expanded secr
bit.ly·1d agoCentralizing Error Handling in Rust with Custom AppError Enums
This article discusses the importance of centralizing error handling in Rust applications using a custom AppError enum combined with map_err
Zig Devlog: Build System Rework Separates Maker and Configurer Processes
This devlog entry from the Zig programming language project announces a major rework of the build system, separating the maker process from
