Code

Added extended error handling
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 22 Oct 2010 12:20:08 +0000 (12:20 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 22 Oct 2010 12:20:08 +0000 (12:20 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@20124 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-core/include/class_jsonRPC.inc

index 07c53ea3ac75b33cca72e577a254cf3bba1bcd9d..1735ad6f647e5f966b1e0b90740f1699abc8714f 100644 (file)
@@ -121,7 +121,11 @@ class jsonRPC {
     {
         if($this->lastStats['http_code'] != 200){
             $error = $this->getHttpStatusCodeMessage($this->lastStats['http_code']);
-            if(isset($this->lastResult['error']['message'])){
+            if(isset($this->lastResult['error']['error'])){
+                $err = $this->lastResult['error']['error'];
+                $message = call_user_func_array(sprintf,$err);
+                $error .= $message;
+            }elseif(isset($this->lastResult['error']['message'])){
                 $error .= ": ".$this->lastResult['error']['message']; 
             }
             return($error);