I never thought about catching the Zend_Db_Adapter_Exception, which is much
better than my idea. Thanks for the idea!
Regards, Jurian
--
Jurian Sluiman
CTO Soflomo V.O.F.
http://soflomo.com
On Wednesday 13 Jan 2010 15:25:12 Ralph Schindler wrote:
> I would highly suggest you keep the database c
I would highly suggest you keep the database connection lazy-loaded if
you either a) have a few routes that definitely don't do anything with
the database, or b) you use caching during some routes thus saving the
trip to the database.
For sites that might have many requests or a high amount of
Another solution would be to update your error controller to test the
exception to see if it is a Zend_Db_Adapter_Exception. When the connection
can't be made, this exception is thrown, but there may be other times when
it is thrown (like a bad query).
The advantage, however, is that your DB conne
I have this piece of code for my custom db resource, extending the zend db
resource:
> $db = parent::init();
> try {
> $this->_connection = $db->getConnection();
> } catch (Exception $e) {
> $this->getBootstrap()->bootstrap('log');
> Zend_Registry::get('log')->crit('Database connectio