17. Exception Handling: A Deeper Look

Objectives

In this chapter you’ll:

• Use try, catch and throw to detect, handle and indicate exceptions, respectively.

• Declare new exception classes.

• Understand how stack unwinding enables exceptions not caught in one scope to be caught in another.

• Handle new failures.

• Use unique_ptr to prevent memory leaks.

• Understand the standard exception hierarchy.

Get C++11 for Programmers, Second Edition now with O’Reilly online learning.

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