[TYPO3-core] RFC #7357: Use exceptions to detect missing user function

Oliver Klee typo3-german-02 at oliverklee.de
Sat Feb 2 17:53:53 CET 2008


Hi,

Ingmar Schlecht schrieb:
> I don't find !$errorMode especially hard to read.

I think it's not good style because $errorMode is an integer, not a
boolean. The code shouldn't only work, it should also make the intent clear.

>> I'll like a private static function best.
> 
> I don't think a private static function makes that much sense for those
> few lines of code.

That's 4 x 5 lines with the same code, meaning 4 places to change if we
want to change the error handling. DRY (Don't Repeat Yourself) isn't
only about aesthetics and readability in the code, it's about making it
easy to maintain.

Regards,


Oliver


More information about the TYPO3-team-core mailing list