SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 6 of 6
  1. #1
    Senior Member
    Join Date
    Apr 2001
    Location
    San Diego,CA,USA
    Posts
    108
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Returning the name of Caller

    Is there any way of knowing who called the function?

    for example if there is a function fNC() and function aCaller() calls it then is there any way to trap the name 'aCaller' in function fNC?

    ------------------


    [This message has been edited by AUTOMATION_GURU (edited 02-25-2003).]

  2. #2
    Junior Member
    Join Date
    Nov 2002
    Location
    Redwood City, CA, USA
    Posts
    5
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Returning the name of Caller

    Looks like ExceptCalls() may be you want. If you look in the help browser for that function is shows how you can raise an exception, call that function, and get a call stack that you can process.

    Hope that helps!

    ------------------
    -Ben
    -Ben

  3. #3
    Senior Member
    Join Date
    Apr 2001
    Location
    San Diego,CA,USA
    Posts
    108
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Returning the name of Caller

    why would you want to raise an exception just to find out the name of the caller?

    ------------------

  4. #4
    Junior Member
    Join Date
    Nov 2002
    Location
    Redwood City, CA, USA
    Posts
    5
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Returning the name of Caller

    Because that's the interface I remembered off the top of my head? I interpreted your question as one of possibility, not one of desireability.

    If you know of a more efficient way to do it, please let me know.

    ------------------
    -Ben
    -Ben

  5. #5
    Senior Member
    Join Date
    Jun 2000
    Location
    Hartford, CT, USA
    Posts
    163
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Returning the name of Caller

    Hmm... this one is a sharp scenario... if I can trap a call to my function, I can do http calls testing over the web too...


    ------------------
    Jaimini Bhatt
    jaiminita@hotmail.com
    jaiminita@yahoo.com
    Jaimini Bhatt

  6. #6
    Senior Member
    Join Date
    Apr 2001
    Location
    San Diego,CA,USA
    Posts
    108
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Returning the name of Caller

    hbscharp you are probably right there is no other way of getting the caller.

    here is a dirty hack then:
    ------------------

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Search Engine Optimisation provided by DragonByte SEO v2.0.40 (Pro) - vBulletin Mods & Addons Copyright © 2017 DragonByte Technologies Ltd.
Resources saved on this page: MySQL 10.71%
vBulletin Optimisation provided by vB Optimise v2.7.1 (Pro) - vBulletin Mods & Addons Copyright © 2017 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.3.0 (Pro) - vBulletin Mods & Addons Copyright © 2017 DragonByte Technologies Ltd.
vBNominate (Lite) - vBulletin Mods & Addons Copyright © 2017 DragonByte Technologies Ltd.
Feedback Buttons provided by Advanced Post Thanks / Like (Pro) - vBulletin Mods & Addons Copyright © 2017 DragonByte Technologies Ltd.
Username Changing provided by Username Change (Free) - vBulletin Mods & Addons Copyright © 2017 DragonByte Technologies Ltd.
BetaSoft Inc.
Digital Point modules: Sphinx-based search
All times are GMT -8. The time now is 04:29 PM.

Copyright BetaSoft Inc.