Exceptions usage

Discussion in 'Questions (Windows Mobile)' started by ghale, Jul 29, 2009.

  1. ghale

    ghale Active Member Licensed User

    Hello,
    I'm using the agraham Exceptions handling libray.
    Now, Is this a good thing to put in EVERY sub an exception check routine?

    If not, where is a good place to check for exceptions?
     
  2. agraham

    agraham Expert Licensed User

    The help tries to explain what is happening. It is a bit heavy going but the information is all there. Basically if an exception occurs in a Sub and is not handled by ErrorLabel then the user will be presented with an error message to halt or continue. So the only place you can handle an exception is in the Sub where it occurs. If the Sub is not doing anything that might cause an exception there is no need for an ErrorLabel statement in that Sub.
     
  3. ghale

    ghale Active Member Licensed User

    Very good, thank you!

    For sub you mean all subs, including events fired like mouse tap, selecting someting, writing text, right?
     
  4. agraham

    agraham Expert Licensed User

    :confused: How does this apply to my answer above?
     
  5. ghale

    ghale Active Member Licensed User

    I mean: when I put an exception catcher in a Sub, I can put into normal function AND into events (like, for example, a click event)?
     
  6. agraham

    agraham Expert Licensed User

    Yes, event Subs are normal Subs, there is nothing special about them and you can even call them like any other Sub, they don't only have to be run by an event.
     
  7. ghale

    ghale Active Member Licensed User

    Ok, thanks. I thinked that, now I'm sure.

    Thank you!
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice