12Exception Handling

When we write application software, we should ensure its correctness and robustness. In other words, the software should run correctly when conditions and user operations are correct. When an unexpected problem arises or users operate improperly, the program should behave properly and reasonably without causing system failure or catastrophic consequences. Because conditions and user operations cannot be guaranteed, we should consider all possible circumstances and take effective measures accordingly. This precautionary measure for dealing with runtime errors is called exception handling.

12.1Basic Concepts of Exception Handling

Some unavoidable runtime errors can be anticipated, including insufficient memory, missing files ...

Get C++ Programming now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.