locked
Try Catch Exceptions RRS feed

  • Question

  • When you use Try Catch for Exceptions, will

    Catch ex As Exception
    catch any possible error that could occur or do you have to catch each exception separately?



    Wednesday, June 10, 2009 10:57 AM

Answers

  • Hi StevenC1976,

    Catch ex as Exception will catch any possible error that occur in the try block.
    But if you need to handle the exceptions separately, then you should also catch the exceptions separately.

    Mark the thread as answered if the answer helps you. This helps others who have the same problem !
    • Marked as answer by StevenC1976 Wednesday, June 10, 2009 11:12 AM
    Wednesday, June 10, 2009 11:04 AM

All replies

  • Hi StevenC1976,

    Catch ex as Exception will catch any possible error that occur in the try block.
    But if you need to handle the exceptions separately, then you should also catch the exceptions separately.

    Mark the thread as answered if the answer helps you. This helps others who have the same problem !
    • Marked as answer by StevenC1976 Wednesday, June 10, 2009 11:12 AM
    Wednesday, June 10, 2009 11:04 AM
  • Thank you Heslacher
    Wednesday, June 10, 2009 11:12 AM