Self-Review Exercises
-
17.1 List five common examples of exceptions.
-
17.2 Give several reasons why exception-handling techniques should not be used for conventional program control.
-
17.3 Why are exceptions appropriate for dealing with errors produced by library functions?
-
17.4 What’s a “resource leak”?
-
17.5 If no exceptions are thrown in a
try
block, where does control proceed to after thetry
block completes execution? -
17.6 What happens if an exception is thrown outside a
try
block? -
17.7 Give a key advantage and a key disadvantage of using
catch(...)
. -
17.8 What happens if no
catch
handler matches the type of a thrown object? -
17.9 What happens if several handlers match the type of the thrown object?
-
17.10 Why would ...
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.