[TYPO3-core] RFC #9355: Add an error and exception handler (backported from FLOW3)

Ernesto Baschny [cron IT] ernst at cron-it.de
Fri Sep 25 16:25:48 CEST 2009


Rupert Germann schrieb:
> Ernesto Baschny [cron IT] schrieb:
>> Nice idea. The order is simply the order found in the array, right? 
> 
> yes
> 
>> If so, I will then just move it up to right after displayErrors before
>> commiting. Ok?
> 
> yes.
> 
> I think there's a problem with the default setting displayErrors=-1
> If I have not set $TYPO3_CONF_VARS['SYS']['displayErrors'] it falls back
> to the default -1. if displayErrors is -1 and the devIpMask matches I
> can't acces the install tool and the extension manager anymore.
> both throw PHP warnings which are now converted to an exception making
> the module unusable.
> 
> I suggest to leave the exceptionalErrors in the default state when
> displayErrors is -1.


Yes, tiny bug in that I set a different exceptionalError under this
condition. This is a left-over from some experiments. In config_default,
in this part of the patch:

+} else if (t3lib_div::cmpIP(t3lib_div::getIndpEnv('REMOTE_ADDR'),
$GLOBALS['TYPO3_CONF_VARS']['SYS']['devIPmask']))    {
+       // with displayErrors = -1 (default), turn on debugging if
devIPmask matches:
+       $TYPO3_CONF_VARS['SC_OPTIONS']['errors']['exceptionalErrors'] =
E_ALL&~E_NOTICE;
+       $TYPO3_CONF_VARS['SC_OPTIONS']['errors']['exceptionHandler'] =
't3lib_error_DebugExceptionHandler';
 }

Just remove the line that overwrites the exceptionalErrors. The default
is E_ALL&~(E_NOTICE|E_WARNING), which will exclude warnings from the
exception handling, because this might lead to stuff like you noticed.
:)  We are still not "warning-free" in a default TYPO3 installation.

Cheers,
Ernesto


More information about the TYPO3-team-core mailing list