Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Class Design Question
Message
From
28/09/2005 16:11:30
 
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
01054128
Message ID:
01054208
Views:
28
>What about:
>
>
>function A() as Boolean
>if not B()
>  * Use sErrMsg to warn the user, if desired
>  return .f.
>endif
>
>function B() as Boolean
>local llSuccess
>try && Whatever you need
>....
>llSuccess = this.C()
>....
>catch to loException && Optionally you can use When
>  this.bErrorOcurred = .t.
>  this.sErrMsg = loException.Message
>finally && Whatever you need
>endtry
>return llSuccess
>
>
>
>function C() as Boolean
>local llSuccess
>try && Whatever you need
>....
>llSuccess = this.D()
>....
>catch to loException && Optionally you can use When
>  this.bErrorOcurred = .t.
>  this.sErrMsg = loException.Message
>finally && Whatever you need
>endtry
>return llSuccess
>
>
>function D() as Boolean
>local llSuccess
>try && Whatever you need
>....
>  if not CheckForExistanceOfRecord
>    this.bErrorOcurred = .t.
>    this.sErrMsg = 'Some message indicating the failure to locate the record'
>  endif
>....
>catch to loException && Optionally you can use When
>  this.bErrorOcurred = .t.
>  this.sErrMsg = loException.Message
>finally && Whatever you need
>endtry
>return llSuccess
>
Hi Hugo,
Try to implement the
RETRY concept
( ice the status and fire a error )
with TRY/ENDTRY.
It is practically impossible.

This is the limit of the scheme TRY/ENDTRY
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform