Description: The research presentation Exception Handling Runtime Errors CSE Technical Paper talks about Exception Handling. It explains lucidly what exception handling is. The research paper suggests that exceptions are runtime errors which occur when user gives an invalid entry. Exceptions are not logical or syntax errors. Exception handling is the way to deal with these errors.
The presentation suggests that EH in VB.net is done by two ways:
- Structured method
- Unstructured method
In the unstructured method the error is skipped or ignored. In the structured method the exceptions are handled in a structural pattern by individual blocks.
Syntax à try
Statements to execute
Catch Variable as exception class
Statements to handle exception
Finally mandatory statement
End try
The base class to work with exceptions is “system.exception”
Conclusion: The presentation concludes on a note that A single try block can have any number of catch blocks defined for it.
- Try blocks can be nested.
- It is mandatory to define at least one catch block for a single try block.
- Finally block is an optional block if used within a try block definition then the code written in that block will always be executed.
- A single try block can have zero or only one finally block defined for it
Whenever an exception occurs then if the try block is defined with more than one catch then each and every catch block is verified in a sequential order till it encounters a valid catch block.
Download Exception Handling Runtime Errors CSE Technical Paper.