Skip to end of metadata
Go to start of metadata

<p>One of the central goals of the framework is <a href="http://framework.zend.com/roadmap/goals/">robust and complete error handling</a> that is E_STRICT compliant. If we are meeting that goal, you should never see a hard error you would have to trap in such a way—you will instead be thrown a meaningful exception.</p>

<p>Therefore, error handling with Zend Framework should be done using PHP try/catch blocks:</p>

<ac:macro ac:name="code"><ac:plain-text-body><![CDATA[
try {
somethingFrameworkRelated();
} catch (Exception $e) {
sendToErrorPage($e->getMessage());
}
]]></ac:plain-text-body></ac:macro>

<p>If you ever encounter a raw PHP error when using the framework, please help us improve Zend Framework by <a href="http://framework.zend.com/issues">filing a bug report</a>.</p>

<p>For uncaught exceptions, see the PHP documentation for <a href="http://www.php.net/set_exception_handler">set_exception_handler</a> and Harry Fueck's <a href="http://www.sitepoint.com/blogs/2006/04/04/">Pretty Blue Screen</a> article on SitePoint.</p>

Labels:
zend_exception zend_exception Delete
example example Delete
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.