Changed API create_error to throw new exception per https://github.com/civicrm/civicr...
authorJose Torres <jtorres@pesc.com>
Mon, 8 Aug 2016 21:21:16 +0000 (14:21 -0700)
committerJose Torres <jtorres@pesc.com>
Mon, 8 Aug 2016 21:21:16 +0000 (14:21 -0700)
api/v3/Membership.php

index 5307224def3116dc67cc5ae595e64d5b123885db..ef3ee0759e5c65bf7acd9b18c8bf5a20858697a5 100644 (file)
@@ -64,7 +64,7 @@ function civicrm_api3_membership_delete($params) {
       return civicrm_api3_create_success(TRUE, $params);
     }
     else {
-      return civicrm_api3_create_error('Could not delete membership');
+      throw new CiviCRM_API3_Exception('Could not delete membership');
     }
   }
   else {