How to handle database stopped

I have this application and about to release to the public. The only thing left to do is handle the database stopped and down. If I to turned of the debugging, I get the CDbException on the screen with the following text “CDbConnection failed to open the DB connection.” I have following the instruction given here but it doesn’t work at all for me



try {


} catch (Exception $e) {



Can we render a view instead of error.php?