Structured Exception Handling in Visual Basic
The document is archived and information here might be outdated

Structured Exception Handling in Visual Basic 

Structured exception handling is a control structure that contains exceptions, isolated blocks of code, and filters to create an exception-handling mechanism. With structured exception handling, your code can differentiate between different types of errors and react accordingly.

In This Section

Exception Handling Tasks

Lists common exception-handling tasks, such as how to catch an exception and how to filter exceptions in a Catch block.

Structured Exception Handling Overview for Visual Basic

Provides an overview of the advantages and structures of structured exception handling.

Exception Class in Visual Basic

Describes the Exception class.

Walkthrough: Structured Exception Handling

Provides a walkthrough of creating a simple application and inserting exception-handling code.

Troubleshooting Exception Handling

Lists errors commonly encountered when using structured exception handling and describes how to correct them.


Throw Statement (Visual Basic)

Describes the Throw statement and demonstrates how to use it to throw an exception.

Try...Catch...Finally Statement (Visual Basic)

Describes Try…Catch…Finally statements and demonstrates how to use them to test code blocks.

Related Sections

Choosing When to Use Structured and Unstructured Exception Handling

Describes the advantages of structured and unstructured exception handling.

Unstructured Exception Handling Overview

Describes unstructured exception handling and demonstrates how to use it.

© 2016 Microsoft