projects
/
civicrm-core.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
10525e4
)
convert website.delete api to throw exception
author
Eileen McNaughton
<eileen@fuzion.co.nz>
Mon, 12 Jan 2015 04:05:56 +0000
(17:05 +1300)
committer
Eileen McNaughton
<eileen@fuzion.co.nz>
Mon, 12 Jan 2015 04:05:56 +0000
(17:05 +1300)
api/v3/Website.php
patch
|
blob
|
blame
|
history
diff --git
a/api/v3/Website.php
b/api/v3/Website.php
index af6a35eed4ab2b17f2c85d1f61c13497a27f4ef6..f22af6603b3cf1997c157e98053b9dae3500595d 100644
(file)
--- 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);
}
}