[TYPO3-core] RFC #9355: Add an error and exception handler (backported from FLOW3)

Karsten Dambekalns karsten at typo3.org
Thu Sep 17 13:18:23 CEST 2009


Hi,

some more comments on those things that apply to FLOW3 as well.

On 07.09.2009, at 16:01, Xavier Perseguers wrote:
> - exceptionalErrors: every index as a value which is 4x the previous
> value. Why is '5' mapped to 4096 and not 1024?

Well, that's how the constants are defined in PHP, it would be clever  
to use those instead of "integers in strings" as in the patch. See http://www.php.net/manual/en/errorfunc.constants.php 
  for the values.

> - getCodeSnippet() code uses three "=" to compare integers: if ($line
> === $lineNumber) but in your own code you only use 2 in such cases. I
> thought the later was according to CGL, is it up to the developer?

We prefer strict comparison in FLOW3 whenever possible (i.e. almost  
always), because it is, well, strict.

> Besides that, I don't like one-line tests without curly brackets  
> (coming
> from FLOW3)

I'll change those (in FLOW3).

> - In class t3lib_error_ProductionExceptionHandler you (they) use  
> inline
> CSS with a few classes, just as in t3lib_error_DebugExceptionHandler.
> Why in this later, in different methods, CSS format (color,
> background-color, ...) is sometimes hardcoded instead of having a  
> proper
> CSS class?

As has been pointed out already, this is to make sure everything is  
available in case of an error. You might not even have the chance to  
get CSS or a template file in case of an error.

Regards,
Karsten
-- 
Karsten Dambekalns
Gimme Five!
http://typo3.org/gimmefive




More information about the TYPO3-team-core mailing list