February 2013
Beginner to intermediate
1080 pages
47h 53m
English
It is common sense to take a method and try it. If it fails, admit it frankly and try another. But above all, try something.
—Franklin Delano Roosevelt
If they’re running and they don’t look where they’re going I have to come out from somewhere and catch them.
—Jerome David Salinger
Objectives
In this chapter you’ll learn:
• To use try, catch and throw to detect, handle and indicate exceptions, respectively.
• To declare new exception classes.
• How stack unwinding enables exceptions not caught in one scope to be caught in another.
• To handle new failures.
• To use unique_ptr to prevent memory leaks.
• To understand the standard exception hierarchy.