Merge pull request #18745 from seamuslee001/backdrop_session
[civicrm-core.git] / CRM / Contact / BAO / SearchCustom.php
index 548ec894aa5357ddd22f9d5fe7155fc54427a19b..fd18da44305633bc7fc07a224bf767cad02085f9 100644 (file)
@@ -76,7 +76,7 @@ class CRM_Contact_BAO_SearchCustom {
 
     $error = include_once $customSearchFile;
     if ($error == FALSE) {
-      CRM_Core_Error::fatal('Custom search file: ' . $customSearchFile . ' does not exist. Please verify your custom search settings in CiviCRM administrative panel.');
+      throw new CRM_Core_Exception('Custom search file: ' . $customSearchFile . ' does not exist. Please verify your custom search settings in CiviCRM administrative panel.');
     }
 
     return [$customSearchID, $customSearchClass, $formValues];
@@ -93,7 +93,7 @@ class CRM_Contact_BAO_SearchCustom {
     list($customSearchID, $customSearchClass, $formValues) = self::details($csID, $ssID);
 
     if (!$customSearchID) {
-      CRM_Core_Error::fatal('Could not resolve custom search ID');
+      throw new CRM_Core_Exception('Could not resolve custom search ID');
     }
 
     // instantiate the new class