Project

General

Profile

Actions

Bug #66797

closed

Can not use other classes for exception handling

Added by Eike Starkmann almost 9 years ago. Updated over 8 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Backend API
Target version:
-
Start date:
2015-05-05
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
6.2
PHP Version:
5.3
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

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

Actions #1

Updated by Wouter Wolters almost 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';

Actions #2

Updated by Eike Starkmann almost 9 years ago

Both tried both not working.

Tried in ext_tables and ext_localconf.

Actions #3

Updated by Wouter Wolters almost 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

Actions #4

Updated by Eike Starkmann almost 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.

Actions #5

Updated by Helmut Hummel almost 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?

Actions #6

Updated by Helmut Hummel almost 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

Actions #7

Updated by Riccardo De Contardi over 8 years ago

  • Status changed from Needs Feedback to Closed

This is closed because these settings are only supported inside LocalConfiguration.php and AdditionalConfiguration.php

Actions

Also available in: Atom PDF