Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How can I handle error in non-visual class?
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00949854
Message ID:
00950048
Views:
16
I didn't try the TRY ... CATCH. It didn't seem like that would fix the problem. It seems like the real problem is when the error occurs within the object itself (i.e. the object's code) and calls the external error procedure. I guess to me, it seems like the try catch would still be doing the same thing ... internal error handled by an external procedure.

I'll go ahead and give it a shot though.

Rodd

>You tried RELEASE ALL EXTENDED only or with the TRY/CATCH?
>
>>This didn't seem to help. I still get the message:
>Can not clear the object SYSTRAY because it is in use.
>The object "mySysTray" is defined as:
>define class mySysTray as systray of systray.vcx
>>Try
>>RELEASE ALL EXTENDED
>>instead. If you are using VFP 8 or 9, you could use TRY/CATCH instead:
>>TRY
>>>   loSysTray = CREATEOBJECT("mySysTray")
>>>   IF TYPE("loSysTray") == "O"
>>>      READ EVENTS
>>>   ENDIF
>>>CATCH TO loEx
>>>   CreateErrorLog (loEx.Procedure, loEx.LineNo, loEx.Message, loEx.ErrorNo, loEx.Line, SYS (16))
>>>ENDTRY
>>>
>>>RELEASE ALL EXTENDED
>>>CLEAR ALL
>>>CLEAR MEMORY
>>>CLEAR PROGRAM                        && CLEAR PROGRAMS FROM MEMORY
>>>CLOSE ALL
>>>CLEAR
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform