Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Catching error information
Message
From
26/06/2018 17:25:15
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01660874
Message ID:
01660888
Views:
68
>Hi,
>
>My app keeps log of all errors that a user would come across. I periodically checks this error log in order to "clean" up issues that users never report. Often times it is hard to figure what actually caused the error.
>
>Therefore, I decided to add 2 more pieces of information to the error log:
>1. Last key user pressed (lastkey())
>2. Where did he/she clicked with the mouse. And this one I don't know how to do. How can I "catch" (and would this really be helpful) where the user clicked right before the error occurred?
>
>TIA.
Dmitry,

I fully agree with Cetin, f.y.i. I have in my Error.log
ASTK                                                     Local                             A             errorlogging
   (    1,    1)                                                                           N             1                                                        (              1,00000000)
   (    1,    2)                                                                           C             "d:\foxproprojects\zorgenzekerheid\classes\googlemailcomposer.vct"
   (    1,    3)                                                                           C             "frmgooglemail1.gglmailbox1.gglgrid1.column1.gglcntgrid1.lblname.click"
   (    1,    4)                                                                           C             "d:\foxproprojects\zorgenzekerheid\classes\googlemailcomposer.vct"
   (    1,    5)                                                                           N             1                                                        (              1,00000000)
   (    1,    6)                                                                           C             "this.Parent.doit()"
   (    2,    1)                                                                           N             2                                                        (              2,00000000)
   (    2,    2)                                                                           C             "d:\foxproprojects\zorgenzekerheid\classes\googlemailcomposer.vct"
   (    2,    3)                                                                           C             "frmgooglemail1.gglmailbox1.gglgrid1.column1.gglcntgrid1.doit"
   (    2,    4)                                                                           C             "d:\foxproprojects\zorgenzekerheid\classes\googlemailcomposer.vct"
   (    2,    5)                                                                           N             77                                                       (             77,00000000)
   (    2,    6)                                                                           C             "      .Left = m.lnLeft"
   (    3,    1)                                                                           N             3                                                        (              3,00000000)
   (    3,    2)                                                                           C             "d:\foxproprojects\zorgenzekerheid\progs\errorlogging.fxp"
   (    3,    3)                                                                           C             "ON... "
   (    3,    4)                                                                           C             "d:\foxproprojects\zorgenzekerheid\progs\errorlogging.prg"
   (    3,    5)                                                                           N             91                                                       (             91,00000000)
   (    3,    6)                                                                           C             "= Astackinfo(m.aStk)"
which is produced by this code:
For i = Alen(m.aStk, 1) - 1 To 1 Step - 1
* I named each element to make it easier to understand (jjh)
	lcCurPrg  = m.aStk(m.i, 2)
	lcModule  = m.aStk(m.i, 3)
	lcSource  = m.aStk(m.i, 4)
	lcModLine = Transform(m.aStk(m.i, 5))
	lcSrcCode = m.aStk(m.i, 6)
Regards,

Koen
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform