Insufficient Documentation of Error Handling Techniques

Incomplete Base
Structure: Simple
Description

This weakness occurs when software documentation fails to clearly explain how the system manages errors, exceptions, or unexpected conditions. Developers are left guessing about the proper handling mechanisms.

Extended Description

Clear error handling documentation is crucial because developers need to understand not just what errors can occur, but how the system expects them to be managed at different architectural levels. This includes guidance for modules, libraries, executable components, and individual functions or API calls. Without this, developers might introduce inconsistent or insecure error handling, leading to crashes, information leaks, or unstable system states. Effective documentation should detail the specific techniques used, such as return codes, exceptions, or logging strategies, and explain the intended flow for each layer of the application. It should answer practical questions: What should a calling function do when an error is returned? Are exceptions meant to be caught locally or propagated? Providing this clarity prevents security gaps and ensures robust, maintainable code across the entire codebase.

References 1
Providing a Framework for Effective Software Quality Assessment
Robert A. Martin and Lawrence H. Shafer
07-1996
ID: REF-963