Question about PEAR::raiseError use in XML_RPC client
| From: | Luis Cruz | Date: | Mon, 26 Jan 2004 21:29:25 +0000 |
| Subject: | Question about PEAR::raiseError use in XML_RPC client | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-175814@lists.php.net to get a copy of this message | ||
Greetings; I recently grabbed the latest source for XML_RPC from CVS for use with a project I am
working on. I grabbed the latest source rather than the stable build mainly because it includes a
handy base class that defines a raiseError method. However, I am puzzled by own thing.
XML_RPC_Base::raiseError calls PEAR::raiseError but does not return the resulting object; no error
handler has been set either.
Am I overlooking how the PEAR_Error object created by PEAR::raiseError would be propagated back to
the caller? It seems like the error would go undetected if not returned.
class XML_RPC_Base {
function raiseError($msg, $code)
{
include_once 'PEAR.php';
PEAR::raiseError(get_class($this) . ": " . $msg, $code);
}
}
---
Luis A. Cruz <lcruz@astaro.com>
Web Project Manager
Astaro <http://www.astaro.com>
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.568 / Virus Database: 359 - Release Date: 1/26/2004