Re: idea: letting the line number and file name be set via user_error

From: Date: Tue, 07 May 2013 21:14:13 +0000
Subject: Re: idea: letting the line number and file name be set via user_error
References: 1 2 3 4  Groups: php.internals 
Request: Send a blank email to [email protected] to get a copy of this message

Am 7.5.2013 um 22:11 schrieb Stas Malyshev <[email protected]>:

> Hi!
> 
>> And today we have the problem that we cannot use in any useful manner
>> trigger_error in libraries, when we don't know where the error
>> originates from. You debug today trigger_error's in libraries with
>> putting a debug_print_backtrace behind the trigger_error. I think you
> 
> Why not use a debugger to debug? Debuggers have backtrace tools.
> 
>> (there you can add a backtrace) too, but you have to catch them, if
>> not your script will abort; but I only need a notice...)
> 
> If you need additional information in the notice, you can always add it
> to the text of the notice.
> 
> -- 
> Stanislav Malyshev, Software Architect
> SugarCRM: http://www.sugarcrm.com/
> (408)454-6900 ext. 227
> 
> -- 
> PHP Internals - PHP Runtime Development Mailing List
> To unsubscribe, visit: http://www.php.net/unsub.php

nothing against the debugger, but it'd be something really time saving to see the entry point
instantly instead of having to use the debugger first...

And yes, I can add it to the text (I can even add a function between which analyses the backtrace
first), but I think we need more useful (= more information) error throwing in PHP?

Bob



Thread (20 messages)

« previous php.internals (#67365) next »