[dev] [commits] Horde branch master updated. d3a3a8ba4f403b2c05c0573ca519b7e349a8c657

Michael M Slusarz slusarz at horde.org
Thu Jul 16 21:15:21 UTC 2009


Quoting Chuck Hagenbuch <chuck at horde.org>:

> Quoting Michael M Slusarz <slusarz at horde.org>:
>
>> I may have missed the previous discussion, but I already added a
>> last-ditch global exception handler (in lib/core.php).  It currently
>> calls Horde::fatal().
>
> Ah, I missed that. We probably want this somewhere other than  
> core.php eventually, since Horde::fatal() isn't appropriate for  
> non-app situations, or for RPC calls, but it's a start. Since we  
> have that, in my opinion we should be able to start phasing out  
> explicit calls to Horde::fatal(), and instead throwing exceptions  
> that we don't expect to be caught.

1.) We could create an exception like Horde_Fatal_Exception that  
indicates that the exception should *never* be caught by the calling  
code.

2.) As for the location in core.php - I think that is still the most  
appropriate place for it.  We could do something like require all apps  
to define a variable before including core.php which would indicate  
how the default exception handler should behave.  (It would also be  
great to get the Horde::compressOutput() calls out of every base.php  
and move it instead to core.php. Same idea - individual apps/pages  
could disable compressOutput as needed).

michael

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



More information about the dev mailing list