[TYPO3-core] RFC #15550:t3lib_error_Exception not available in some cases

Helmut Hummel helmut at typo3.org
Wed Aug 25 01:05:44 CEST 2010


Hi Steffen,

On 25.08.10 00:20, Steffen Kamper wrote:
> 
> Helmut Hummel schrieb:
>>
>>> Solution:
>>> Use a simple Exception instead of t3lib_error_Exception. 
>>
>> I would prefer to use a require_once, right before the exception
>> instead. The the t3lib_error_Exception class would be available in any case.
> 
> hm - i see a chain of classes using require_once if we make better 
> differences.

Well you can't avoid all require_once even if you have an autoloader
present. But I'm fine if anyone finds another solution for this.

> This is a php catchable error, so Exception is the right 
> one. Leave t3lib_exception for the internal ones.

I disagree here. The t3lib_error_Exception was introduced to represent a
php error (as Exception), so it should be used in the php error handler
or removed completely.

Besides the current use in the error handler, it is only used once in
the t3lib_extjs_ExtDirectRouter. But in the router I would say it is
misued, because that's no php error at that point but more a
UnexpectedValueException.


I still would vote to keep it, and a require_once at that place would
not harm imho.

just my 2 cents

Regards Helmut


More information about the TYPO3-team-core mailing list