[TYPO3-core] RFC #10081: t3lib_div never die if a file is not found
Martin Kutschker
masi-no at spam-typo3.org
Tue Oct 20 11:46:08 CEST 2009
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.
Masi
More information about the TYPO3-team-core
mailing list