PEAR_Error
| From: | Roko Roic | Date: | Mon, 19 Nov 2001 09:55:50 +0000 |
| Subject: | PEAR_Error | ||
| Groups: | php.pear.general | ||
| Request: | Send a blank email to pear-general+get-513@lists.php.net to get a copy of this message | ||
Hi,
I am trying to set a callback function for PEAR error handling to a method
of $this class. Can it be done?
Thsi does not work:
class ServiceDB extends PEAR {
function ServiceDB() {
$this->PEAR();
$this->setErrorHandling(PEAR_ERROR_CALLBACK, '_logError');
}
function _logError($er) {
}
}
Also, does the callback function take any arguments, or more specificaly:
can I log PEAR_Error.toString() to a log file by sending the object as an
argument to the log function??
Thanks
Roko Roic