����

Recommended Answers

All 3 Replies

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

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.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.