Hello, How can I catch the exception and print an error message to visitiors when there is a database connection error? DB connection params are defined in the application.ini. and db resource is initiated in bootstrap file.
something like this? : //function initDatabase () { try { $this->bootstrap('db'); $db = $this->getResource('db'); Zend_Registry::set('db', $db); } catch (Exception $e) { echo 'db error '.$e->getMessage(); exit; // I have to put exit here in order to prevent other init functions running? } Also, I have to put exit(); in catch part in order to prevent the following init functions run. Is this the correct way? Thanks scs