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 the try
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 you specify a base-class type as the type of a catch
handler, then throw
objects of derived-class types?
17.11 Suppose a catch
handler with a precise match to an exception object type is available. Under what circumstances might a different handler be executed for exception objects of that type?
17.12 Must throwing an exception cause program termination?
17.13 What happens when a catch
handler throw
s an exception?
17.14 What does the statement throw;
do?