Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Redefine THIS. error
Message
From
28/05/2021 03:26:32
 
General information
Forum:
Visual FoxPro
Category:
Troubleshooting
Miscellaneous
Thread ID:
01680602
Message ID:
01680805
Views:
51
Hi Dmitry.

>Why would you think that 3 seconds after the 1st error the second one shows the error "Cannot redefine THIS."?

Looking at your code, it appears that perhaps you misunderstand the scope of the Try/Catch. It doesn't just catch if the code between the Try and Catch fails, but also any code that calls. So it's possible that there is something going wrong in your dl_ErrorMessage function, or something it calls. Is there any chance that, since you have hard coded the source of the error in the logging code, that you have copied that error handling code somewhere else and have forgotten to change the name?

Anyway, your error logging should not just log the Message property, but also the Procedure, LineNo and for completeness, the LineContents and Details properties so that you can see where the error actually came from.

Of course if the problem is coming from a non code source (like VFP trying to refresh a grid and finding the cursor is gone) then even the the extra details might not help.

Ian Simcock.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform