| Overriding the front controller dispatch method [message #15715] |
Fri, 10 November 2006 15:33  |
halfer Messages: 9535 Registered: January 2006 Location: West Midlands, UK |
Faithful Member |
|
|
Hi all
I have reset my factories.yml to use "myWebFrontController", which I have ensured is being instantiated by my application. I have also created a dispatch() method in this, which essentially calls parent::dispatch(), but I have wrapped it in a try block so I can catch any Propel errors sitewide (eg if the database server is down).
However this dispatch() method in my class appears not to being called, so I think I have misunderstood the API. Can anyone shed any light?
Thanks
Remember Palestine
|
|
|
| Re: Overriding the front controller dispatch method [message #15716 is a reply to message #15715 ] |
Fri, 10 November 2006 15:48   |
halfer Messages: 9535 Registered: January 2006 Location: West Midlands, UK |
Faithful Member |
|
|
Aha - actually, the dispatch() method is called. But something is making a database connection beforehand, so if the database server is down, my method will try to catch it too late.
Would a better technique be to wrap a try() block around the require_once call to config.php in the front controller?
Remember Palestine
|
|
|
|