Re: Pear_Error not triggered when mysql is down with MDB2

From: Date: Thu, 07 Jul 2005 14:54:33 +0000
Subject: Re: Pear_Error not triggered when mysql is down with MDB2
References: 1 2  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-19897@lists.php.net to get a copy of this message
On 08/07/2005, at 12:38 AM, Lorenzo Alberton wrote:
Dan Rossi wrote:
Hi there I just realised something, if the database server is down no pear error gets triggered like the rest I am calling the fetchmode method after creating the connection however when the server is off i get this fatal error Fatal error: Call to undefined method MDB2_Error::setFetchMode() in $this->_db = MDB2::connect($this->settings['DB_DataObject']['database'],$this-
settings['DB_DataObject']['MDB2']); if (PEAR::isError($this->db)) {
    //uh-oh... handle error
}
$this->_db->setFetchMode(MDB2_FETCHMODE_ASSOC);
So no error is handled in connect ? No other section of MDB2 or other pear classes do I have to worry about this I have the pear errors set to a callback class.

« previous php.pear.general (#19897) next »