Thanks, that's pretty cool (PrettyBlueScreen)! Not for a production environment though. I was trying to come up with a way to hide the details from the user and simply display "an application error has occured - support has been notified" sort of thing, log the errors, and then allow the user to continue with what they were doing (assuming they could still do other useful things). My confusion is around how to have the handler break out of the front controller loop from deep within the application if I hit an uncaught exception. I thought of having an ErrorController to handle things but not sure how to call it at the right time.
-k Martin Martinov-2 wrote: > > Take a look at http://bg.php.net/set_exception_handler or better - > google for PrettyBlueScreen.php - you can use it with the framework or > make your oun implementation. > > On 11/10/06, KMiller <[EMAIL PROTECTED]> wrote: >> >> 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. >> >> > > > -- > Warm regards, > Martin Martinov > http://mmartinov.com/ > > -- View this message in context: http://www.nabble.com/centralized-error-handling-tf2419139s16154.html#a6746507 Sent from the Zend Framework mailing list archive at Nabble.com.
