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.

Error Routines

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 10-26-2009, 10:58 AM
Basic4ppc Expert
 
Join Date: Apr 2009
Posts: 506
Default Error Routines

Hi,

When an error is trapped is there a way to determine which line the error occured on and resume execution at a specified place?

Thanks
Reply With Quote
  #2 (permalink)  
Old 10-26-2009, 11:11 AM
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

You can't find the line directly but if you can put more than one ErrorLevel statement in your Sub vectoring to different labels to more precisely locate where the error occurred. Using B4PObject(6) and the Door library or my http://www.basic4ppc.com/forum/addit...html#post12486 you can find out more details of the error. The help for the Exceptions library has a topic on error handling in Basic4pppc.

The default exception handling in an optimised compiled program does not show the error line. For debugging my http://www.basic4ppc.com/forum/addit...html#post27120 includes a DebugRecompiler which can give the error line but you wouldn't use if for the final application because of the performance hit.

You can't resume after an Exception.
__________________
Sorry, but I don't answer questions by PM or email.
Please post your queries in the forum.
Reply With Quote
  #3 (permalink)  
Old 10-26-2009, 12:05 PM
Basic4ppc Expert
 
Join Date: Apr 2009
Posts: 506
Default

Many thanks for the reply.

i know what will cause the error i am trapping for.
I am currently using a goto as a "resume next" but i wanted it a little more sophisticated in case of another error being triggered

Maybe error level improvements in the wishlist?

Thanks again
Reply With Quote
  #4 (permalink)  
Old 10-26-2009, 12:10 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 Smee View Post
Maybe error level improvements in the wishlist?
Unlikely as Basic4ppc error handling is based upon how .NET handles errors, which is always by non-restartable Exceptions. See that help topic in the Exceptions library.
__________________
Sorry, but I don't answer questions by PM or email.
Please post your queries in the forum.
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


All times are GMT. The time now is 10:31 AM.


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