On Thu, 17 Apr 2008 18:19:10 +0200, Rik Wasmus wrote:
Quote:
On Thu, 17 Apr 2008 18:03:51 +0200, ZeldorBlat <zeldorblat@gmail.com>
wrote:
>
Quote:
>On Apr 17, 11:56 am, lawp...@gmail.com wrote:
Quote:
>>Is there a way to find out the name of the function within the
>>function?
>>>
>>I'm doing troubleshooting of a page in which I call a lot of
>>functions. I had a simple error message pop up, which was okay back
>>when the page way simple. Now that the page has grown, it's a PITA to
>>find out where exactly the error message is being triggered. It would
>>be very helpful if I could find out which function I'm "in" when the
>>error message gets called.
>>
><http://www.php.net/manual/en/language.constants.predefined.php>
>
Or alternatively, do a debug_print_backtrace();, very nice when
troubleshooting.
Best option for programmers, definately. For users, sometimes a
completely bizzare error message that doesn't mean ANYTHING gets better
reporting. "lock timeout" gets much less attention from users than "Why
did it just say it was out of tuna?", and since *I* know where the tuna
error message is, even though the message is actually "fainted from loss
of tuna", I can still find exactly where the failure was, and know what
to look for in logs.
--
Cunningham's Second Law:
It's always more complex than you expect, even when you take
Cunningham's Second Law into account.