[TYPO3-core] RFC #9355: Add an error and exception handler (backported from FLOW3)
Rupert Germann
rupi at gmx.li
Fri Sep 25 18:46:22 CEST 2009
Ernesto Baschny [cron IT] schrieb:
>> - added a param description for the new var $exceptionalErrors in
>> constructor of t3lib_error_ErrorHandler
>
> I don't like that solution. Why do we then need a setExceptionalErrors()
> method then? If we call this later, this is never really applied, as it
> won't change the errors PHP handles as exception.
>
> So I prefer my previous solution in that the error handler class itself
> does nothing on contruct and only if someone instructs it to handle
> errors (calling "setExceptionalErrors()") the error handler is put into
> place. Which means the error_handling can also be turned off on demand
> (by calling setExceptionalErrors(0) on the that object).
that makes sense. I'll revert it to your variant and change the comments
accordingly.
...
> Exactly. The solution is much simpler than expected: add to the top of
> handleError():
>
> if (error_reporting()==0) { return FALSE; }
great ;-)
> meaning the error that PHP has the instruction not to output anything
> (prepended by "@") won't also be handled by our handler.
>
> After having this, we could also add E_WARNING to the list of default
> errors to handle, as it will then just handle warnings that we are not
> currently "ignoring".
yes. then all will work as before.
greets
rupert
More information about the TYPO3-team-core
mailing list