First page Back Continue Last page Graphics
13.2 Exception-Handling Overview
C++ code
- try {
- code that may raise exception
- }
- catch (exceptionType){
- code to handle exception
- }
try block encloses code that may raise exception
One or more catch blocks follow
- Catch and handle exception, if appropriate
- Take parameter; if named, can access exception object