[TYPO3-dev] use exceptions instead of die()?

Ivan Gomez Rodriguez igomez at igalia.com
Mon Feb 4 13:42:00 CET 2008


Hello,

We are developing an extension to manage exceptions to use in our
current and future developments.

We'll release this extension in the next weeks, and it will be upload to
TER but we have some improvements planned to do before.

Basically we define our exceptions classes and redefine some core and
third-party extensions behaviour in order to throw exceptions. In our
plugins we catch these exceptions, showing a error message to user and
sending a mail with exception info to us.

I attach here a prealpha version of our extension. If you want to try it
  first check this related bug :

http://bugs.typo3.org/view.php?id=7029


Steffen Kamper wrote:
> "Martin Kutschker" <martin.kutschker-n0spam at no5pam-blackbox.net> schrieb im 
> Newsbeitrag news:mailman.1.1202080756.5909.typo3-dev at lists.netfielders.de...
>> Steffen Kamper schrieb:
>>> "Martin Kutschker" <martin.kutschker-n0spam at no5pam-blackbox.net> schrieb 
>>> im Newsbeitrag 
>>> news:mailman.1.1202074638.6844.typo3-dev at lists.netfielders.de...
>>>> Hi!
>>>>
>>>> There are a few places where TYPO3 die()'s. That's pretty ugly. How 
>>>> about throwing exceptions and using a default exception handler to catch 
>>>> them. For starters it could simply output the error message, but we 
>>>> could add some layout etc to it.
>>>>
>>>> Masi
>>> Hi,
>>>
>>> i followed discussion in core list and a general +1 for using exceptions 
>>> (as they are still in, see ModuleMenu).
>> But, as you may have noticed, the devil is in the details. What exception 
>> to use? Do we need our own stack, etc.
>>
>> Masi
> 
> i think this will grow. Sure, for descriptive messages a stack is needed.
> May be a good start is to write a basic exceptionhandler, like adodb still 
> has.
> 
> vg  Steffen 
> 
> 
> _______________________________________________
> TYPO3-dev mailing list
> TYPO3-dev at lists.netfielders.de
> http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-dev
> 


-- 
Iván Gómez Rodríguez
Computer Science Engineer
mailto:igomez at igalia.com
Igalia http://www.igalia.com


More information about the TYPO3-dev mailing list