Bug #66797
closedCan not use other classes for exception handling
0%
Description
Hi,
i'm trying to use other classes for exception handling and i found this three settings:
$TYPO3_CONF_VARS['SYS']['errorHandler'] = '\Testen\Errbit\Error\ErrorHandler'; $TYPO3_CONF_VARS['SYS']['productionExceptionHandler'] = '\Testen\Errbit\Error\ProductionExceptionHandler'; $TYPO3_CONF_VARS['SYS']['debugExceptionHandler'] = '\Testen\Errbit\Error\DebugExceptionHandler';
I set them in the ext_localconf of my extension.
In backend the new classes are shown correctly under configuration, but when i produce an error the old classes are used.
Can this be a race condition, that the new configuration is is not loaded at that time?
When i set the new classes manually in LocalConfiguration.php everything works as expected.
Anyway i feel that extending the exception handling is not working like described here:
http://docs.typo3.org/typo3cms/CoreApiReference/ErrorAndExceptionHandling/Configuration/Extending/Index.html
Updated by Wouter Wolters over 9 years ago
- Status changed from New to Needs Feedback
Can you try it with $GLOBALS['TYPO3_CONF_VARS'] instead of $TYPO_CONF_VARS?
Furthermore you can try: $GLOBALS['TYPO3_CONF_VARS']['SYS']['errorHandler'] = 'Testen\\Errbit\\Error\\ErrorHandler';
Updated by Eike Starkmann over 9 years ago
Both tried both not working.
Tried in ext_tables and ext_localconf.
Updated by Wouter Wolters over 9 years ago
You cleared the system caches?
Otherwise you can debug the incoming values in typo3/sysext/core/Classes/Core/Bootstrap.php function configureExceptionHandling
Updated by Eike Starkmann over 9 years ago
Yes, i used "Clear all cache" of the install tool.
I already debugged this function the incoming values are the default ones at that moment the error is thrown.
Updated by Helmut Hummel over 9 years ago
Hi!
Eike Starkmann wrote:
I set them in the ext_localconf of my extension.
In backend the new classes are shown correctly under configuration, but when i produce an error the old classes are used.
Can this be a race condition, that the new configuration is is not loaded at that time?
The question is when the error occurs. If the error occurs very early in the bootstrap, TYPO3 has not read ext_localconf.php files yet, thus your config will not be used (because it cannot)
When i set the new classes manually in LocalConfiguration.php everything works as expected.
What is wrong with just doing so?
Anyway i feel that extending the exception handling is not working like described here:
http://docs.typo3.org/typo3cms/CoreApiReference/ErrorAndExceptionHandling/Configuration/Extending/Index.html
Nothing written there mentions ext_localconf.php What exactly isn't working for you what is described there?
Updated by Helmut Hummel over 9 years ago
btw. To avoid such confusion, we will remove support to exchange the error handler in a different place than LocalConfiguration or AdditionalConfiguration
Updated by Riccardo De Contardi about 9 years ago
- Status changed from Needs Feedback to Closed
This is closed because these settings are only supported inside LocalConfiguration.php
and AdditionalConfiguration.php