Not sure about the Rest_Server, but generally there are two types of
exception you can get:
1. Critical exceptions, that happen during application boostrap process
2. MVC Exceptions that happen during dispatch process and afterwards
If you want to handle exceptions of first type you may wrap actual execution
of your aplycation in a try-catch in your index.php file and redirect them
to the appropriate handler like so:
try
{
$application = new Zend_Application(
APPLICATION_ENVIRONMENT,
APPLICATION_PATH . '/configs/application.ini');
$application->bootstrap();
$application->run();
}
catch(Exception $exception)
{
$YourExceptionHandler::handleException($exception);
}
This will catch all critical exceptions that may break application execution
process. All other exceptions (MVC exceptions) can be cought at the dispatch
process. For example you may use a front controller plugin that catches MVC
exceptions and handles them accordingly.
If you wish you can even utilize a single handler class to handle both types
of exceptions and perform certain actions, like for example logging
exception data with Zend_Log, sending emails or just printing out.
Hope that helps, good luck,
Dmitry.
--
View this message in context:
http://n4.nabble.com/Dealing-with-uncatched-exceptions-and-using-set-exception-handler-in-Zend-Framework-tp1566606p1566739.html
Sent from the Zend Framework mailing list archive at Nabble.com.