From 10e9bafd96646004feb256c2c2f31b483eefa4d8 Mon Sep 17 00:00:00 2001 From: hickert Date: Fri, 22 Oct 2010 12:20:08 +0000 Subject: [PATCH] Added extended error handling git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@20124 594d385d-05f5-0310-b6e9-bd551577e9d8 --- gosa-core/include/class_jsonRPC.inc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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); -- 2.30.2