Merge pull request #17614 from demeritcowboy/xmlproc-acttypes-more
[civicrm-core.git] / CRM / Extension / Manager / Payment.php
index 9e90ed8e6e6c5a68a4b5800c8cc28499a0cc32d9..0919690a6a41c52669ef5f60cdcd633062e78b06 100644 (file)
@@ -109,7 +109,7 @@ class CRM_Extension_Manager_Payment extends CRM_Extension_Manager_Base {
   public function onPreUninstall(CRM_Extension_Info $info) {
     $paymentProcessorTypes = $this->_getAllPaymentProcessorTypes('class_name');
     if (!array_key_exists($info->key, $paymentProcessorTypes)) {
-      CRM_Core_Error::fatal(ts('This payment processor type is not registered.'));
+      throw new CRM_Core_Exception(ts('This payment processor type is not registered.'));
     }
 
     $dao = new CRM_Financial_DAO_PaymentProcessor();
@@ -229,7 +229,7 @@ class CRM_Extension_Manager_Payment extends CRM_Extension_Manager_Base {
     }
 
     if (empty($class_name)) {
-      CRM_Core_Error::fatal("Unable to find payment processor in " . __CLASS__ . '::' . __METHOD__);
+      throw new CRM_Core_Exception('Unable to find payment processor in ' . __CLASS__ . '::' . __METHOD__);
     }
 
     // In the case of uninstall, check for instances of PP first.