From: hickert Date: Fri, 22 Oct 2010 12:20:08 +0000 (+0000) Subject: Added extended error handling X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=10e9bafd96646004feb256c2c2f31b483eefa4d8;p=gosa.git Added extended error handling git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@20124 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-core/include/class_jsonRPC.inc b/gosa-core/include/class_jsonRPC.inc index 07c53ea3a..1735ad6f6 100644 --- a/gosa-core/include/class_jsonRPC.inc +++ b/gosa-core/include/class_jsonRPC.inc @@ -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);