Hi Folks,
I am new to Revolution and was wondering if there is a way in a function to tell who called the function (i.e. I want to see the current call stack)?
I have a function that finds the correct connected database and returns its ID to the caller. If for some reason the database is not connected I want to consider it to be a logic error and notify the user of the error with information that would be useful to me (the developer) so I can more easily figure out why the error happened (not that I ever expect it to happen but I do tend to program defensively).
Thanks, Brian
Who Called Function?
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
-
- VIP Livecode Opensource Backer
- Posts: 1005
- Joined: Sat Apr 08, 2006 3:06 pm
- Contact:
Take a look at the executionContexts Brian. It returns the chain of calls leading up to the current spot in a script where it is called.
Trevor DeVore
ScreenSteps - https://www.screensteps.com
LiveCode Repos - https://github.com/search?q=user%3Atrevordevore+topic:livecode
LiveCode Builder Repos - https://github.com/search?q=user%3Atrevordevore+topic:livecode-builder
ScreenSteps - https://www.screensteps.com
LiveCode Repos - https://github.com/search?q=user%3Atrevordevore+topic:livecode
LiveCode Builder Repos - https://github.com/search?q=user%3Atrevordevore+topic:livecode-builder
-
- Posts: 3
- Joined: Fri Apr 21, 2006 2:12 pm