[TYPO3-core] RFC: #15576: Enable customization for the backend and frontend fatal error messages

Reinhard Führicht rf at typoheads.at
Mon Aug 30 15:19:47 CEST 2010


Hi Steffen and list,

attached is a new version of the patch. But some problems came up while 
adjusting the patch. See my comments below.

Am 2010-08-27 19:25, schrieb Steffen Gebert:
>
> A few things, which prevent a positive review:
>
> * 'errorMessageLogo' => TYPO3_maindir . 'gfx/typo3logo.gif'
> - has to be TYPO3_mainDir
> - -1 for a config option for this, IMHO the option to defina a custom
> template should be sufficient

This option was removed.
There is one option left, called: exceptionTemplate

>
> * changing signature of
> function·debug_typo3PrintError($header,·$text,·$js,·$baseUrl·=·'')
> You're removing a feature - to print the error message in an alert
> box.

Generally, no problem.
But when trying to integrate the usage of an HTML template into the 
error handler, I realized, that methods like debug_typo3PrintError would 
have to throw an exception to make the error handler do the work. When 
$js is passed (which is not the case throughout the core at the moment), 
no exception must be thrown but the JS should be printed.


>
> * naming of typo3PrintError()
> I'm strongly against reusing this name! Maybe printError() or similar.

Done.

>
> * the most important point, while we're at changing this functionality:
> Long-term plan is to throw exceptions everywhere and get rid of
> typo3PrintError(), isn't it?
> IIRC the production exception/error handler calls typo3PrintError().
> What do you think of modifiying this error handler and implement the
> functionality there? While deprecation phase, t3PE() can throw an
> exception, until it's removed.

See above. I tried to integrate the code, but it is difficult to handle 
various use cases with only one utility method.
Please have a look at the patch to know what I mean.

>
> * CGL and nitchpicking:
> - Please uses spaces after "if" before the (
> - only one space after a comment (not // prepend "/")
> - no tabs in "empty" lines
> so maybe you could enable your IDE to show white-space chars while
> you're at core developement? ;-)
> - use uppercase for boolean values TRUE/FALSE
> - $logo·=·'<img·src="'·.·$imageSrc·.·'"·/>';
> where's the alt="Logo" or similar ;-)
> - print·$errorMessage;
> why print? we use echo everywhere. For the sake of consistency I'd
> keep echo. Or is there any advantage?

I tried to keep anything CGL compliant this time. Please forgive me, if 
I forgot something.

Kind regards,
Reinhard

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 15576_v3.diff
Type: text/x-diff
Size: 15926 bytes
Desc: not available
URL: <http://lists.typo3.org/pipermail/typo3-team-core/attachments/20100830/f40f2bc7/attachment-0001.diff>


More information about the TYPO3-team-core mailing list