I agree with Teme64

Here is a small sample

      Try
           statement1
           statement2
      Catch [ exception [ As type ] ] [ When expression ]  ' or simply catch (for all
           statement1
           statement2
      [Catch ... ]       ' you can have diff. catches for diff. exceptions

      Finally            'this is optional
           statement1
           statement2
      End Try

Try identifies the block of code for which particular exceptions will be activated
Catch block will check for all (or specified) exceptions and will execute the statements that follow in case these exceptions occur
Finally block will get executed whether an exception is thrown or not

Edited 1 Year Ago by mridul.ahuja

This question is obvious, "What can I do to Unhandled exceptions" obvious your application won't run if you unhandle exceptions so you need to handle it, there are quite a number of samples, tutorial guides out there on the net gloogling could have given you lots of them, and the question you should be asking is "how to" handle exceptions.

As being said the "Try" statement or method will help you with handling your exceptions.

This article has been dead for over six months. Start a new discussion instead.