Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Why TRY...CATCH…FINALLY not support RETRY ?
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00818569
Message ID:
00819188
Views:
9
>>>No this simulate the retry with a external cycle.
>>>
>>>I want retry on try error line directly.
>>
>>The difference is my code gives you what you WANT now. If you know the possible error is resolvable, then
>>not check for that BEFORE trying your try.
>
>Well, say it's his example of the missing CDX file, where you just need to re-USE the table.
>
>Checking for the existence of a CDX on every USE gets real old, real fast.

But, for that example you could do...
TRY
   USE MyTable
CATCH TO oException FOR oException.Error = 1234 && Whatever no CDX is
   IF oSDT.ReIndex('MyTable')
      TRY 
         USE MyTable
      ENDTRY
   ENDIF
CATCH oException
   Throw oException
FINALLY
   IF NOT USED('MyTable')
      RETURN .F.
   ENDIF
ENDTRY
Which would still be a hell of a lot of code for every use.

BOb
Previous
Reply
Map
View

Click here to load this message in the networking platform