Throw Catch Exceptions
1. Try the block
2. Catch the exception.
3. Cleanup any remaining issues within the finally section.
Filtering Exceptions: We can use multiple catch for a single try section.
Only the first catch will be executed and then it will switch to finally.
The finally section cannot access variables declare in the try section.
If we want to create a variable declaration and make sure that it is cleaned
up even if an error occurs, then use the "using" keyword.
No comments:
Post a Comment