Professional Documents
Culture Documents
Catch :
Handles a specific type of anticipated error
Example: An Input/Output Error (As System.Exception.IOException).
A filter can also be provided for conditional halting
This is just a Boolean (True / False) statement after the Exception Type.
You must use the When keyword + condition (e.g., When y=0)
Several Catch blocks can be provided to Catch different Exceptions
It is wise to try to handle all expected types of non-debuggable errors.
Finally (optional):
(Always) executes a desired block of clean-up code.
Whether or not an Exception is Thrown.
However, if desired, this may be skipped with an Exit Try statement…
Placed at the end of the Catch Block.
Example: Error Handling
Example (cont.)
Midterm Test Announcement / Check
Our Midterm Test will be Next Class
The main part will be on Wednesday, July 9, First Period.
However, the test is actually in 2 parts:
Part 1 - Check of the Base Project (Today)
We already did this together.