[TYPO3-core] RFC #12093: Improve the error and exception handling

Rupert Germann rupi at gmx.li
Mon Oct 12 14:07:55 CEST 2009


hi,

after having the improved error and exception handling running for a 
while, I found some things that are still quite unflexible until now.

Problems:

1. if devIPmask matches the users IP the exceptionhandler is set to the 
string 't3lib_error_DebugExceptionHandler' (hardcoded). this makes it 
impossible to register your own exceptionhandler class.

2. the string 't3lib_error_DebugExceptionHandler' switches also the 
errorhandler to debug-mode where it displays errors as flashmessages in 
the BE.

3. Whether the error and exception handling writes to devlog is 
configured with [SYS][enable_DLOG]. If enable_DLOG is active the devlog 
is filled with all devlog messages from the core, which might be not the 
wanted behaviuor.



Solutions:

1. introduce 2 new conf vars called
$TYPO3_CONF_VARS['SYS']['debugExceptionHandler']
$TYPO3_CONF_VARS['SYS']['productionExceptionHandler']

those vars are set to the build-in exceptionhandlers by default, but 
both can be overridden by user defined classes. The values of devIPmask 
and displayErrors are used to decide which of these 2 classes will be 
registered as exceptionhandler.

2. use the configured debugExceptionHandler to decide whether the 
errorhandler is in debug-mode or not

3. introduce 2 new conf vars called
$TYPO3_CONF_VARS['SYS']['enable_errorDLOG']
$TYPO3_CONF_VARS['SYS']['enable_exceptionDLOG']

as their names say, they are used to write either errors or exceptions 
or both to the devlog


I uploaded an updated documentation to
http://wiki.typo3.org/index.php/File:Error_and_exception_handling.odt

which now even contains an example how to extend the built-in error and 
exception handling with an own class.

greets
rupert



More information about the TYPO3-team-core mailing list