Syntax 19.2 (cont.)
|
Example: |
try
{
List staff = read_list();
process_list(staff);
}
catch (logic_error& e)
{
cout << "Processing error " << e.what() << "\n";
}
|
| Purpose: |
Provide one or more handlers for types of
exceptions that may be thrown when executing a block of statements.
|
|