O'Reilly logo

Application Development Using Visual Basic® and .NET by Dana L. Wyatt, Peter Thorsteinson, Robert J. Oberg

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Exceptions

An inevitable part of programming is dealing with error conditions of various sorts. This section introduces the exception-handling mechanism of VB.NET, beginning with a discussion of the fundamentals of error processing and various alternatives that are available. We then carefully go through the VB.NET exception mechanism, which includes a Try block, Catch handlers, and a Finally block. You can raise exceptions by means of a Throw statement. The .NET class library provides an Exception class, which you can use to pass information about an exception that occurred. To further specify your exception and to pass additional information, you can derive your own class from Exception. When handling an exception, you may want to throw a new ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required