On Wed, Aug 26, 2009 at 16:52, Greg Beaver<g...@chiaraquartet.net> wrote:
> performance hit when an error is completely hidden either by
> error_reporting or by @ (i.e. no track_errors, no user error handler, no
> other things that would expect to see the errors).  That's all that

error_get_last()...

You can't know, at the time the error should be raised, if something
later in the script wants to retrieve that error.

The only thing we can do, if we don't want to break scripts that
gracefully deal with errors, is to store the last "raw" errormsg,
errormsg arguments, caller, file, line.. and then if the message will
get used later then generate the pretty error messages "on demand".

"can do" is used very loosely there, as I don't think it can sanely be
implemented :)


The irony of this all is track_errors=off did exactly what we want,
boycott the formatting routines when nothing wants to use the results,
but after the introduction of error_get_last() (5.2.0) that ini option
is useless as the formatting routines are always executed now :)

-Hannes

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to