Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Catching error information
Message
From
29/06/2018 10:59:38
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01660874
Message ID:
01660966
Views:
60
>>>Thank you. But now I am wondering if, when I will be looking at the error log much later after the error occurred, if these values will make sense to me. Ideally it would be nice to know which button or grid or object where the user clicked last (that fired something that caused the error). But I don't know how to get it.
>>
>>Won't ASTACKINFO() give you everything in the stack - including the button click or whatever caused the error?
>>
>>Here is one way to use it: https://stackoverflow.com/questions/3630819/in-foxpro-how-to-get-call-stack-info-for-logging
>
>The reason I started this thread is I saw, in the error log of one of the customers, an entry about a problem is the KeyPress method of a text box. This KeyPress method has my code. In order for me to determine what caused the error and where I may need to change the code is to know what specific key the user pressed at the time of the error. And the ASTACKINFO() won't show this. As far as I know, only Lastkey() would capture this. Hence I need to record it into the error log.

ASTACKINFO still is the most precious helper.
Besides stack info you would log all the variables, then you would also have access to the m.nKeyCode variable's value which is passed to a Keypress (along with nShiftAltCtrl). That information is more granular than what lastkey() might return to you. If you still think it has usefulness then you could also add it to your log.
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform