diff --git a/api/v3/Contacts/Correctnamecasesjob.php b/api/v3/Contacts/Correctnamecasesjob.php index f203b0a..fa7ace4 100644 --- a/api/v3/Contacts/Correctnamecasesjob.php +++ b/api/v3/Contacts/Correctnamecasesjob.php @@ -54,14 +54,14 @@ function contacts_correctnamecasesjob_correct_name_case(&$aName) { * @return array API result descriptor * @see civicrm_api3_create_success * @see civicrm_api3_create_error - * @throws API_Exception + * @throws CRM_Core_Exception */ function civicrm_api3_contacts_correctnamecasesjob($params) { $lastContactExaminedOffset = CRM_Core_BAO_Setting::getItem(CAPSCORRECT_EXTENSION_NAME, CAPSCORRECT_LAST_CONTACT_OFFSET); // See if the returned value is NULL or negative if ( $lastContactExaminedOffset === NULL || $lastContactExaminedOffset < 0 ) { - throw new API_Exception(/*errorMessage*/ 'Unable to complete scheduled job, the offset was not returned.', /*errorCode*/ 1); + throw new CRM_Core_Exception(/*errorMessage*/ 'Unable to complete scheduled job, the offset was not returned.', /*errorCode*/ 1); } // Get the number of contacts to correct this run $numberOfContactsToRun = DEFAULT_DAILY_CONTACTS_CORRECTED; @@ -82,7 +82,7 @@ function civicrm_api3_contacts_correctnamecasesjob($params) { ); $getContactsApiResults = civicrm_api('Contact', 'get', $getContactsApiParams); if ( civicrm_error($getContactsApiResults) ){ - throw new API_Exception(/*errorMessage*/ 'Unable to complete scheduled job, error fetching contacts.', /*errorCode*/ 2); + throw new CRM_Core_Exception(/*errorMessage*/ 'Unable to complete scheduled job, error fetching contacts.', /*errorCode*/ 2); } $contactsCorrectedThisRun = 0;