Download the free trial version
Basic4android Video
Features
Tutorials and manuals
Showcase
Screenshots

Go Back   Android Development Forum - Basic4android > Basic4ppc (Windows Mobile) > Questions (Windows Mobile)
Documentation Wiki Register Members List B4P Search Today's Posts Mark Forums Read

Questions (Windows Mobile) Post any question regarding Basic4ppc.

Exceptions usage

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 07-29-2009, 02:43 PM
ghale's Avatar
Basic4ppc Veteran
 
Join Date: Dec 2008
Location: Earth, Europe, Italy, Puglia, Lecce
Posts: 219
Default Exceptions usage

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?
Reply With Quote
  #2 (permalink)  
Old 07-29-2009, 04:00 PM
agraham's Avatar
Basic4ppc Expert
 
Join Date: Jul 2007
Location: Cheshire, UK
Posts: 6,072
Awards Showcase
Innovator medal Beta Tester Forum Contributer 
Total Awards: 3
Default

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.
__________________
Sorry, but I don't answer questions by PM or email.
Please post your queries in the forum.
Reply With Quote
  #3 (permalink)  
Old 07-29-2009, 04:16 PM
ghale's Avatar
Basic4ppc Veteran
 
Join Date: Dec 2008
Location: Earth, Europe, Italy, Puglia, Lecce
Posts: 219
Default

Very good, thank you!

For sub you mean all subs, including events fired like mouse tap, selecting someting, writing text, right?
Reply With Quote
  #4 (permalink)  
Old 07-29-2009, 04:20 PM
agraham's Avatar
Basic4ppc Expert
 
Join Date: Jul 2007
Location: Cheshire, UK
Posts: 6,072
Awards Showcase
Innovator medal Beta Tester Forum Contributer 
Total Awards: 3
Default

Quote:
Originally Posted by ghale View Post
For sub you mean all subs, including events fired like mouse tap, selecting someting, writing text, right?
How does this apply to my answer above?
__________________
Sorry, but I don't answer questions by PM or email.
Please post your queries in the forum.
Reply With Quote
  #5 (permalink)  
Old 07-29-2009, 04:40 PM
ghale's Avatar
Basic4ppc Veteran
 
Join Date: Dec 2008
Location: Earth, Europe, Italy, Puglia, Lecce
Posts: 219
Default

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)?
Reply With Quote
  #6 (permalink)  
Old 07-29-2009, 04:51 PM
agraham's Avatar
Basic4ppc Expert
 
Join Date: Jul 2007
Location: Cheshire, UK
Posts: 6,072
Awards Showcase
Innovator medal Beta Tester Forum Contributer 
Total Awards: 3
Default

Quote:
Originally Posted by ghale View Post
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)?
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.
__________________
Sorry, but I don't answer questions by PM or email.
Please post your queries in the forum.
Reply With Quote
  #7 (permalink)  
Old 07-29-2009, 04:57 PM
ghale's Avatar
Basic4ppc Veteran
 
Join Date: Dec 2008
Location: Earth, Europe, Italy, Puglia, Lecce
Posts: 219
Default

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

Thank you!
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Dim memory usage JamesC Questions (Windows Mobile) 2 07-21-2008 08:09 AM
Exceptions handling library agraham Additional Libraries 5 05-28-2008 11:52 AM
CryptoEx and Exceptions manuals are online Erel Announcements 0 05-17-2008 01:20 PM
Exceptions encountered agraham Bug Reports 17 07-27-2007 09:24 PM
Memory Usage Scubaticus Questions (Windows Mobile) 6 07-03-2007 05:37 PM


All times are GMT. The time now is 08:20 AM.


Powered by vBulletin® Version 3.6.12
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0