Summary

Section 17.1 Introduction

  • An exception (p. 758) is an indication of a problem that occurs during a program’s execution.

  • Exception handling (p. 758) enables you to create applications that can handle (i.e., resolve) exceptions and perform appropriate cleanup when an exception that cannot or should not be handled occurs. More severe problems may require a program to notify the user of the problem before terminating in a controlled manner.

Section 17.2.1 Defining an Exception Class to Represent the Type of Problem That Might Occur

  • Class exception (p. 759) is the standard base class for exception classes. It provides virtual function what (p. 759) that returns an appropriate error message and can be overridden in derived classes. ...

Get C++ How to Program, 10/e now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.