Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Catch not Firing
Message
 
To
18/04/2003 09:57:26
General information
Forum:
Visual FoxPro
Category:
Troubleshooting
Miscellaneous
Thread ID:
00779148
Message ID:
00779166
Views:
16
>
>      try
>         erase (lcSecondDoc)
>         if file(lcSecondDoc)
>            wait window 'Erase clearly failed because the file still exist! Catch should fire.'
>         endif
>      catch
>         wait window 'Document in use'
>         .ActiveDocument.close(0)
>         .application.quit
>         oWord = .null.
>         release oWord
>         llReturn = .t.
>      endtry
>
Robert,

The CATCH in this case is not firing because no error has occurred (according to Fox). Move your ERASE out of the TRY/CATCH and you will see that no error is generated. The ERASE command does not generate errors. If you want to catch an error for this, you could put an ERROR command or THROW command where your WAIT WINDOW is.
_________________________________
There are 2 types of people in the world:
    Those who need closure
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform