Marc Zucchelli on Tue, 24 Sep 2002 05:40:08 +0200


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: [PLUG] [C QUESTION] how to tell caller of a function


As a suggestion, it's usually good practice to have
the function to return an error code, and have the
function that calls it handle the error, so in that
case you wouldn't need to do a stack trace or
anything.

> In C, how may a C function determine which function
> called it?
> 
> If I have a function called by lots of other
> function and there's an
> error, I might want to know where the call came from
> so I can trace it
> back.


__________________________________________________
Do you Yahoo!?
New DSL Internet Access from SBC & Yahoo!
http://sbc.yahoo.com
_________________________________________________________________________
Philadelphia Linux Users Group        --       http://www.phillylinux.org
Announcements - http://lists.netisland.net/mailman/listinfo/plug-announce
General Discussion  --   http://lists.netisland.net/mailman/listinfo/plug