In LotusScript, is it possible to get the name of the Sub or Function that is currently running without having to hard code it?
I’m asking because I have a standard error trapping function that logs error information but I have to input the name of the sub everytime I use it:
Sub MySub
On error goto ErrorProcess
…
Exit Sub
ErrorProcess:
Call ProcessError(gc_TypeElement, gc_Element, “MySub”)
End Sub
It would be a lot easier if I could get the sub name programmatically.
Thank you.
Subject: LS: Is it possible to get the name of the Sub?
Yup, Lsi_Info is what you need. Designer Help has naff-all about it, but you can read more at Johann’s site, right here:
http://dev.kanngard.net/dev/home.nsf/Permalinks/ID_20021021230944.html
Hope that helps
–
The website for Ben Poole, a UK-based software developer, IT consultant, and director of the legacy application data specialists, LDC Via Ltd.
Subject: Good question … Great response
Subject: RE: LS: Is it possible to get the name of the Sub?
Yes, this is exactly what I was looking for.
Thanks a lot.
hcl-bot
February 10, 2004, 3:50am
5
Subject: This is what you need!
You can use Getthreadinfo, it passes the LSI_info you need. Getthreadinfo(1) for exampel will give you the name of the current procedure. Read more about other parameters in the help file.
Regards
Daniel Bjarsch