}
/**
- * @deprecated
- * @see CRM_Core_TemporaryErrorScope::ignoreException
+ * PEAR error-handler which converts errors to exceptions
+ *
+ * @param $pearError
+ * @throws PEAR_Exception
*/
- public static function ignoreException($callback = NULL) {
- if (!$callback) {
- $callback = array('CRM_Core_Error', 'nullHandler');
- }
-
- $GLOBALS['_PEAR_default_error_mode'] = PEAR_ERROR_CALLBACK;
- $GLOBALS['_PEAR_default_error_options'] = $callback;
- }
-
public static function exceptionHandler($pearError) {
CRM_Core_Error::backtrace('backTrace', TRUE);
throw new PEAR_Exception($pearError->getMessage(), $pearError);
}
/**
- * Error handler to quietly catch otherwise fatal smtp transport errors.
+ * PEAR error-handler to quietly catch otherwise fatal errors. Intended for use with smtp transport.
*
* @param object $obj The PEAR_ERROR object
- *
* @return object $obj
* @access public
* @static
return $obj;
}
- /**
- * (Re)set the default callback method
- *
- * @return void
- * @access public
- * @deprecated
- * @see CRM_Core_TemporaryErrorScope::ignoreExxception
- * @static
- */
- public static function setCallback($callback = NULL) {
- if (!$callback) {
- $callback = array('CRM_Core_Error', 'handle');
- }
- $GLOBALS['_PEAR_default_error_mode'] = PEAR_ERROR_CALLBACK;
- $GLOBALS['_PEAR_default_error_options'] = $callback;
- }
-
/*
* @deprecated
* This function is no longer used by v3 api.