Branch 'kolab-webadmin-3.1' - lib/api

Jeroen van Meeuwen vanmeeuwen at kolabsys.com
Tue Feb 11 11:37:47 CET 2014


 lib/api/kolab_api_service_user.php |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 3899e02d0c124fb0058e3d355793c442821feb9c
Author: Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen at kolabsys.com>
Date:   Tue Feb 11 11:37:18 2014 +0100

    Correct throwing Exceptions, rather than raising them </Pythonism>

diff --git a/lib/api/kolab_api_service_user.php b/lib/api/kolab_api_service_user.php
index 202510d..4d985bb 100644
--- a/lib/api/kolab_api_service_user.php
+++ b/lib/api/kolab_api_service_user.php
@@ -214,7 +214,7 @@ class kolab_api_service_user extends kolab_api_service
         }
 
         if ($users['count'] > 1) {
-            raise Exception, "More than a single entry found.";
+            throw new Exception("More than a single entry found.", 942);
         }
 
         // get user data




More information about the commits mailing list