Search for in the Packages This site (using Yahoo!) Developers Developer mailing list General mailing list SVN commits mailing list
PEAR_Error - это объект, которые создается каждой функцией PEAR в случае возникновения ошибки. Он предоставляется информацию о том, почему функция завершилась с ошибкой.
Как именно вы получаете объект - зависит от PEAR::SetErrorHandling()
<?php class ePearError extends Exception { protected $_type; protected $_userInfo; function getType() { return $this->_type; } function getDebugInfo() { return $this->getUserInfo(); } function getUserInfo() { return $this->_userInfo; } function __construct(&$errorObject) { parent::__construct($errorObject->getMessage(), $errorObject->getCode()); $this->_type = $errorObject->getType(); $this->_userInfo = $errorObject->getUserInfo(); } function __toString() { return sprintf('[%s: message="%s" code=%d info="%s"]', $this->getType(), $this->getMessage(), $this->getCode(), $this->getUserInfo()); } } function pearErrorCallback(&$errorObject) { throw new ePearError($errorObject); } PEAR::setErrorHandling(PEAR_ERROR_CALLBACK, 'pearErrorCallback'); ?>