Determining code location within code?
Author: firstname.lastname@example.org (Mark Wheeler)
To help with bug analysis I'd like to output the location in the code (i.e. procedure name, operation name, trigger) that a problem has occurred in. The bug may be a logic issue, so I can't rely on $procerrorcontext, but I would like to have access to the PROCNAME, OPERATIONNAME, TRIGGERNAME etc ... that is provided by $procerrorcontext. I would like the equivalent of $formname, so I could output the location in a form of a code message (e.g. putmess "Form name: %%$formname%%% Code location:%%$location%%%"). I'm thinking about turning on $proc_profiling, running a line of code, then turning profiling off, but it seems that profiling only shows triggers I execute and not the trigger or proc that I'm in, so this won't work even if I use some included procedure code. I can, of course, manually specify the location of my message but I would like a more generic and automatic way of doing this. Any ideas how to do this in Uniface 9.6? Or if not will at least Uniface 10 have this functionality? Many thanks Mark