Merge pull request #2749 from monishdeb/HR-317
[civicrm-core.git] / CRM / Core / Error.php
index 93fcc5bb178731524e36c505f5c8f40e652f9d6b..55e2cbeaf0567c6b5a69b5a551dc16c5b58ed08c 100644 (file)
@@ -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.