Hi,

I wanted to generate an error:
http://covoiturage-belgique.be/test
I have put in this page: echo $this->test->test;  (there is no variable
test)
But I get a Php notice page.

For the 404 it seems to work:
http://covoiturage-belgique.be/testblablabla

This is my errorController:
switch ($errors->type) {
        case Zend_Controller_Plugin_ErrorHandler::EXCEPTION_NO_CONTROLLER:
        case Zend_Controller_Plugin_ErrorHandler::EXCEPTION_NO_ACTION:
                // 404 error -- controller or action not found
                $this->getResponse()->setRawHeader('HTTP/1.1 404 Not Found');
                $path = $this->config->paths->pathToLogs->default . "404-" . 
date("Ymd-H")
. ".log";
                if( !file_exists($path) || filesize($path) < 5*1024*1024) {
                        $log = new Zend_Log(new MyZend_Log_Writer_Stream( 
                        $this->config->paths->pathToLogs->default . "404-" . 
date("Ymd-H") .
".log" ));
                        $exception = $errors->exception;
                        $log->warn( $exception->getMessage() );
                }
                $this->render('404-error');
                break;
        default:
                $exception = $errors->exception;
                $log = new Zend_Log(new MyZend_Log_Writer_Stream( 
                $this->config->paths->pathToLogs->default . "error-" . 
date("Ymd-H") .
".log" ));
                $log->crit($exception->getMessage() . "\n" . 
$exception->getTraceAsString());
                $this->view->anError = true;
                $this->render('error');
        break;
}

In the bootstrap:
error_reporting(E_ALL|E_STRICT);
ini_set('display_errors', true);


Thank you for any kind help.
-- 
View this message in context: 
http://www.nabble.com/Why-isn%27t-my-errorController-called-for-Notice-errors---tp22984087p22984087.html
Sent from the Zend Framework mailing list archive at Nabble.com.

Reply via email to