Rethrowing an Exception
- Rethrowing exceptions
- Use when exception handler cannot process exception; Can still rethrow if handler did some processing
- Can rethrow exception to another handler
- Goes to next enclosing try block
- Corresponding catch blocks try to handle
- To rethrow
- Use statement throw;
- No arguments
- Terminates function
Figure 6.3:
Rethrowing an exception. (Part 1 of 2)
|
Figure 6.4:
Rethrowing an exception. (Part 2 of 2)
|
2004-12-28