Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.

  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 21. Handling Errors > TRY CATCH BLOCKS

21.2. TRY CATCH BLOCKS

In Visual Basic, you can use a Try Catch block to catch exceptions. One common form of this statement has the following syntax:

Try
    ...codeToProtect...
Catch ex As ExceptionType1
    ...exceptionCode1...
Catch ex As ExceptionType2
    ...exceptionCode2...
Finally
    ...finallyCode...
End Try


  

You are currently reading a PREVIEW of this book.

                                                                                                                    

Get instant access to over $1 million worth of books and videos.

  

Start a Free Trial


  
  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint