From: Eileen McNaughton Date: Mon, 12 Jan 2015 04:05:56 +0000 (+1300) Subject: convert website.delete api to throw exception X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=1bc8dc45bc541169a6f509fefdd5317d32556aac;p=civicrm-core.git convert website.delete api to throw exception --- diff --git a/api/v3/Website.php b/api/v3/Website.php index af6a35eed4..f22af6603b 100644 --- a/api/v3/Website.php +++ b/api/v3/Website.php @@ -76,10 +76,11 @@ function _civicrm_api3_website_create_spec(&$params) { * * @param array $params * {@getfields website_delete} + * @return array + * API result + * @throws \API_Exception * @example WebsiteDelete.php Std Delete Example * - * @return array - * API result Array * @access public * @todo convert to using Basic delete - BAO function non standard */ @@ -96,7 +97,7 @@ function civicrm_api3_website_delete($params) { } } else { - return civicrm_api3_create_error('Could not delete website with id ' . $websiteID); + throw new API_Exception('Could not delete website with id ' . $websiteID); } }