[TYPO3-core] use php5 for new code

Robert Lemke robert at typo3.org
Thu Oct 11 10:55:39 CEST 2007


Hi folks,

Am 11.10.2007 um 10:16 schrieb Karsten Dambekalns:

>>> Surely there's a demand for additional / special exception  
>>> classes for TYPO3
>>> but IMO these should be founded on a well-known and widely used  
>>> base.
>>
>> maybe we can take a sneak peak at 5.0 in these cases?!
>
> Take a look, but be warned: we have not yet fully (formally)  
> designed a good exception hierarchy, although Robert and I somehow  
> seem to "feel" the same about the topic... Anyway, let's combine  
> forces!

In short, the rough concept we follow in 5.0 at the moment:

  - really use exceptions only for errors and exceptional state.  
Don't misuse exceptions for controlling
    the program flow.

  - rather centrally catch exceptions than at many places. Although  
exceptions which can be handled at
    a certain place should be catched there, too (i.e. for example if  
a SOAP connection fails, provide
    some user-friendly error handling right away)

  - convert all PHP errors and warnings to exceptions

  - use a global exception handler as a fall back solution

  - use a more user-friendly exception handler near the MVC Front  
Controller which handles exceptions
    according to the context (ie. in production mode log / email  
errors rather than displaying them)

  - build an exception hierarchy for each package which inherit more  
generic exceptions:

    RuntimeException
      > T3_Framework_Exception
        > T3_Framework_Service_Exception
          > T3_Framework_Service_SOAP_Exception
             > T3_Framework_Service_SOAP_InvalidWSDLURIException

robert
-- 
http://typo3.org/gimmefive


-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 186 bytes
Desc: Signierter Teil der Nachricht
Url : http://lists.netfielders.de/pipermail/typo3-team-core/attachments/20071011/f6430cc7/attachment.pgp 


More information about the TYPO3-team-core mailing list