Calling Func/Proc

new topic     » topic index » view thread      » older message » newer message

I would really like to have a function that returns the name of the
calling func/proc. To be used like as follows:

function query_db(sequence s)
   if debug then
      logfile( calling_proc() )
   end if
   ...
end function

logfile() is my output function. In this case, I am using it for debugging
purposes.

Instead of putting hundreds of lines of code (one for each function
that would call query_db()), I'd rather just have the one line in query_db().
That seems reasonable, doesn't it?

Is this possible, and how easy if so?

new topic     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu