Hi all!
I'm trying to "upgrade" one of my applications with better structure and
error handling. Now I'm stuck with handling with failed object creation, for
example, creating a database adapter or load a configuration file.
$oDBAdapter = Zend_Db::factory($oXMLConfig->database->adapter, array(
'host' => $oXMLConfig->database->host,
'port' => $oXMLConfig->database->port,
'username' => $oXMLConfig->database->username,
'password' => $oXMLConfig->database->password,
'dbname' => $oXMLConfig->database->name,
'options' => $aDBOptions
));
If the supplied information is incorrect the application doesn't seem to
load the applications error controller (which is succesfully called when you
try to load a non existing controller).
So I tried something like:
try {
} catch (Exception $e) {
echo 'ERROR';
exit();
}
But the Zend Framework keeps echoing it's own error message.
How can I overrule this default behavior in a correct way?
Thanks!
--
View this message in context:
http://www.nabble.com/Catch-failed-object-creation--tp19396316p19396316.html
Sent from the Zend Framework mailing list archive at Nabble.com.