CRM-14370 - API Kernel - Fix short-circuiting which breaks formatters/exceptions...
authorTim Otten <totten@civicrm.org>
Sat, 22 Mar 2014 01:56:23 +0000 (18:56 -0700)
committerTim Otten <totten@civicrm.org>
Sun, 6 Apr 2014 04:15:24 +0000 (21:15 -0700)
Civi/API/Kernel.php

index 50f25eeba3ab458cfb7f40240f40c0ecf017441e..a974c50415c455191f32e7bfe4bef7af7dbfdf36 100644 (file)
@@ -135,7 +135,7 @@ class Kernel {
         $result = isset($extra) ? $function($apiRequest['params'], $extra) : $function($apiRequest['params']);
       }
       else {
-        return civicrm_api3_create_error("API (" . $apiRequest['entity'] . ", " . $apiRequest['action'] . ") does not exist (join the API team and implement it!)");
+        throw new \API_Exception("API (" . $apiRequest['entity'] . ", " . $apiRequest['action'] . ") does not exist (join the API team and implement it!)");
       }
 
       // For output filtering, process $apiWrappers in reverse order