Most Code is Rarely Used
The computer almost never visits that mountain of code that specifies what to do if various very particular things go wrong. It spends most of its time in a tiny pile of code that specifies what do if all goes well. Further, it spends nearly all its time in the wisp of code that handles the most common case.~ Roedy (1948-02-04 age:70)
I think most programmers think of error and anomaly detection as something you tack-on at the end. Designers of computer languages tend to push features to catch and handle errors to second tier. What would happen if we logically separated code and error detection and treated handling errors as a first class problem? You could then read a program without the distraction of any error-detecting/recover. We would formally recognize the four types of code, error handling, error detection, all-ok-code, common-case code. This information could be used to generate various summaries, that would make it faster to browse code, deleting what is temporarily irrelevant from view. Code quality in error detection and handling is problematic since you can’t simulate every possible combination of errors to test. I think you would be surprised to discover how little of that code is ever tested.