X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=CRM%2FCore%2FError.php;h=55e2cbeaf0567c6b5a69b5a551dc16c5b58ed08c;hb=0ef7efe286ef81f99aa7d8501d37630a560105d4;hp=93fcc5bb178731524e36c505f5c8f40e652f9d6b;hpb=6a4257d40b9496d33cd0960d06de07e78f5f8aa2;p=civicrm-core.git diff --git a/CRM/Core/Error.php b/CRM/Core/Error.php index 93fcc5bb17..55e2cbeaf0 100644 --- a/CRM/Core/Error.php +++ b/CRM/Core/Error.php @@ -791,28 +791,20 @@ class CRM_Core_Error extends PEAR_ErrorStack { } /** - * @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 @@ -823,23 +815,6 @@ class CRM_Core_Error extends PEAR_ErrorStack { 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.