Structured Exception Handling (SEH)

The errors in a software program can be classified as syntax errors, runtime errors, and logical errors.

The syntax errors are caught by the compiler and signaled by the IDE. You are by now familiar with the underlining of an undeclared variable name or invalid expression with the blue line. If you keep the mouse cursor hovering over the respective expression, the actual error message will be shown. The errors are also shown in the output window (at the bottom of the Visual Studio .NET IDE) when you try to compile a program with syntax errors.

The runtime errors (most commonly known as exceptions) are problems that arise when the program is executed. For example, let's assume that you have a statement like: ...

Get Visual Basic® .NET by Example now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.