Using Structured Exception Handling Instead of On Error

Older versions of Visual Basic support trapping and raising errors using the On Error statement. Starting with Visual Basic .NET 2002, it also supports a better concept in programming languages—structured exception handling. It is worth noting that the On Error statement still works in Visual Basic .NET, and you can use it if you want, but it is not the recommended way to deal with errors.

Digging Into Structured Exception Handling

Before you can understand what structured exception handling (SEH) is, you should understand just what a structured exception—or even a non-structured exception—is. Otherwise, you won't know what you're handling. An exception is something that happens out of the ...

Get Microsoft® Visual Basic® .NET 2003 Kick Start 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.