Sorry,

I wasn't clear.  I meant uncaught exceptions.  Would I extend Zend_Exception
to accomplish this?  

-km



Willie Alberty wrote:
> 
> On Oct 10, 2006, at 1:02 PM, KMiller wrote:
> 
>> Any ideas on how to best centralize error handling in ZFW? I want  
>> to trap all hard errors (i.e. set_error_handler, etc.) and redirect  
>> them to an errorPage. -km
> 
> One of the central goals of the framework is robust and complete  
> error handling (http://framework.zend.com/roadmap/goals/) which is  
> E_STRICT compliant. If we are meeting our goals, you should never see  
> a hard error you would have to trap in such a way--you will instead  
> be thrown a meaningful exception.
> 
> Therefore, error handling with the ZFW should be done using PHP try/ 
> catch blocks:
> 
> try {
>       somethingFrameworkRelated();
> } catch (Exception $e) {
>       sendToErrorPage($e->getMessage());
> }
> 
> If you ever encounter a raw PHP error when using the framework, I  
> would consider that a bug that should be filed in the Issue Tracker  
> (http://framework.zend.com/issues).
> 
> --
> 
> Willie Alberty, Owner
> Spenlen Media
> [EMAIL PROTECTED]
> 
> http://www.spenlen.com/
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/centralized-error-handling-tf2419139s16154.html#a6745692
Sent from the Zend Framework mailing list archive at Nabble.com.

Reply via email to