It seems like a good solution but you run into trouble if, like on my application, you use some components on AppController::beforeFilter(). Furthermore, since your view would be layed out on your layout, if your layout uses some content coming from database (through a component, because you shouldn't use models on AppController) then more trouble. Probably best thing is to lay out DB errors on a different layout, and do some checking on beforeFilter() to avoid using components when rendering DB errors.
Or you could just use the alternative I've sent since DB connection errors are application killers, and you may not want to enable OB buffering on your bootstrap just to catch those errors ☺ -MI --------------------------------------------------------------------------- Remember, smart coders answer ten questions for every question they ask. So be smart, be cool, and share your knowledge. BAKE ON! ________________________________________ De: [email protected] [mailto:[EMAIL PROTECTED] En nombre de Felix Geisendörfer Enviado el: Jueves, 30 de Noviembre de 2006 02:52 a.m. Para: [email protected] Asunto: Re: Catching DB connection failure I had this problem a while ago and came up with a way to handle it in the AppController: http://www.thinkingphp.org/2006/07/04/handling-database-connection-errors-in-cakephp/ --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
