From 1bc8dc45bc541169a6f509fefdd5317d32556aac Mon Sep 17 00:00:00 2001 From: Eileen McNaughton Date: Mon, 12 Jan 2015 17:05:56 +1300 Subject: [PATCH] convert website.delete api to throw exception --- api/v3/Website.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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); } } -- 2.25.1