-- 吴 洪声 <[EMAIL PROTECTED]> wrote
(on Friday, 27 July 2007, 04:44 PM +0800):
> I'm created ErrorController.php, but it doesn't help.
> 
> some of my index.php:
> 
> $frontController = Zend_Controller_Front::getInstance();
> $frontController->throwExceptions(true);

Don't turn on throwExceptions() when using the ErrorHandler, as it
bypasses that functionality. Remove the above line, and I suspect it
should work as expected.

> // $frontController->returnResponse(true);
> $frontController->setParam('noViewRenderer', true);
> $frontController->setControllerDirectory('../app/controllers');
> $frontController->registerPlugin(new  
> Zend_Controller_Plugin_ErrorHandler());
> 
> try {
>       $frontController->dispatch();
> } catch (Exception $e) {
>       echo $e->getMessage();
>       $log_message = "[".$e->getMessage()."]";
>       $logger->log($log_message, Zend_Log::EMERG);
> }
> 

-- 
Matthew Weier O'Phinney
PHP Developer            | [EMAIL PROTECTED]
Zend - The PHP Company   | http://www.zend.com/

Reply via email to