[dev] Previous exceptions for Horde_Exception

Michael M Slusarz slusarz at horde.org
Thu Feb 11 18:07:48 UTC 2010


Quoting Gunnar Wrobel <p at rdus.de>:

> This morning I moved some functionality from the Horde_Exception  
> class into a separate Horde_Exception_Prior class and modified all  
> calls where we provided Horde_Exception with either a PEAR error or  
> an Exception as first argument.
>
> I did this in order to support previous exceptions as described in  
> this proposal:  
> http://framework.zend.com/wiki/display/ZFPROP/previous+Exception+on+Zend_Exception+-+Marc+Bennewitz
>
> Jan did not like the approach of introducing a new Exception class  
> so I wanted to ask for feedback. I attach the log of the discussion  
> I had with one. It should already cover some of the pros and cons.

Haven't had a chance to look at this in depth yet, but at a cursory  
glance I would agree with Jan - namely, we should have an  
all-singing/all-dancing single point of contact (e.g. Horde_Exception)  
that should do everything for us rather than separate exceptions.  I  
don't think it is necessary for Horde_Exception itself to exactly  
mirror PHP's exception interface (e.g. Horde_Exception can have  
different parameter requirements for its constructor vs. the native  
PHP Exception class).  As far as I am concerned, Horde_Exception is  
meant to be an abstraction layer that does exactly what is happening  
here: make the details of differing unerlying exception APIs  
transparent.

michael

-- 
___________________________________
Michael Slusarz [slusarz at horde.org]



More information about the dev mailing list