Just checked your code.

class AppError extends ErrorHandler {
        function missingConnection($params) {
                extract(Router::getPaths());
                extract($params, EXTR_OVERWRITE);

                $this->controller->plugin = basename(dirname(__FILE__));
                $this->controller->layout = 'noswad_error';
                
                $this->controller->viewPath = 'errors';
                $this->controller->webroot = $this->_webroot();
                $this->controller->set(array('model' => $className,
        
'title' => 'Missing Database Connection'));
                $this->controller->render('missing_connection');
                exit();
        }
}

This seems interesting. I haven't yet gone through the whole API docs,
particularly for ErrorHandler so I didn't know availability of this
inheritance. Cool.

Now I notice that you do:

include('app_error.php');

on your base controller. That should be a require_once() per CakePHP coding
practices (if you bake the Cake way, then go all the way.)

Also is this because Cake is not including your app_error.php? Any reason
why? 

-MI

---------------------------------------------------------------------------

Remember, smart coders answer ten questions for every question they ask. 
So be smart, be cool, and share your knowledge. 

BAKE ON!


-----Mensaje original-----
De: [email protected] [mailto:[EMAIL PROTECTED] En nombre
de AD7six
Enviado el: Jueves, 30 de Noviembre de 2006 06:20 a.m.
Para: Cake PHP
Asunto: Re: Catching DB connection failure


Mariano Iglesias:

I would suggest that anything related to (tech) error handling, that
isn't catered for with an appError class, isn't doing it the cake way
;).


--~--~---------~--~----~------------~-------~--~----~
 You received this message because you are subscribed to the Google Groups 
"Cake PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to