[TYPO3-core] RFC #10081: t3lib_div never die if a file is not found

Martin Kutschker masi-no at spam-typo3.org
Thu Oct 22 11:25:14 CEST 2009


Martin Kutschker schrieb:
> Rupert Germann schrieb:
>> Solution:
>> remove the die() call and add an possibility to throw an exception or
>> call debug(). The newly introduced function parameter called "errorMode"
>> decides which action is taken if a referenced languge file is not found:
>>  0 (default) - call debug(), 1 - do nothing, 2 - throw an exception
> 
> The mode is IMHO pointless. 0 and 1 are more or less the same (when youre IP is not listed in the
> devIP range). 2 is the an improved version of the current behaviour and enables the caller to react
> upon an error. So the logical move away from the current code is 2. And as you can catch an
> exception there is no need to have the options 0 and 1.
> 
> Conclusion: remove the option and throw always an exception on error. This solution is in line with
> the plan to turn all die() calls to throw() calls.

It seems not to bother the authors of the patch. How do the others feel about this? To me this
option is something from the bad old days. We don't need this option.

Shall I provide a patch here (same RFC) or create a new one? Do I have any chance to get a +1 for this?

Masi


More information about the TYPO3-team-core mailing list