Free Source Code and Tutorials

Custom Search

35-Try Catch

In programming, there are Exceptions that handle errors and other exceptional events. As a programmer, it is the best way to used it to deal with unhandled exceptions. In Visual Basic, there is a try catch that handle errors. Try…Catch statement composed of a Try block and followed by one or more Catch clauses, which stated the handlers for various exceptions.



    [ tryStatements ]
    [ Exit Try ]
[ Catch [ exception [ As type ] ] [ When expression ]
    [ catchStatements ]
    [ Exit Try ] ]
[ Catch ... ]
[ Finally
    [ finallyStatements ] ]
End Try


  1. <pre>Try
  2.     Process.Start("")
  3. Catch ex As Exception
  4.     MsgBox("The page cannot be loaded because " &amp; vbCrLf &amp; ex.Message)
  5. End Try
Facebook Comments
(Visited 1 times, 1 visits today)
Share this

Check Your Domain Ranking

Leave a Reply

Your email address will not be published. Required fields are marked * © 2016 Frontier Theme

Subscribe For Latest Updates

Signup for our newsletter and get notified when we publish new articles for free!

%d bloggers like this: