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/