Error gettig automatically raised ?

From: Date: Wed, 22 Aug 2001 22:57:53 +0000
Subject: Error gettig automatically raised ?
Groups: php.pear.general 
Request: Send a blank email to pear-general+get-282@lists.php.net to get a copy of this message
Hi, When I define PEAR::setErrorHandling(PEAR_ERROR_CALLBACK, ..) how can I make this callback automatically called when an error occurs ? e.g, my class does class foo extends PEAR { function foo() { $this->PEAR(); PEAR::setErrorHandling(PEAR_ERROR_CALLBACK, array(&$this,'method')); // that is fine if ($some_test) $this->raiseError('foobar corrupted', PEAR_ERROR_CALLBACK); $this->_db = DB::connect( long dsn ... // now shouldn't the connect automatically raise an error // ? [..snipped...] I use PEAR::setError and not $this->setError because I want all errors be handled by this class... ty, Markus -- Markus Fischer, http://guru.josefine.at/~mfischer/ EMail: mfischer@guru.josefine.at PGP Public Key: http://guru.josefine.at/~mfischer/C2272BD0.asc PGP Fingerprint: D3B0 DD4F E12B F911 3CE1 C2B5 D674 B445 C227 2BD0 -All your scripts are belong to Zend-

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