diff --git a/lib/View/JSON.php b/lib/View/JSON.php index e25cd66..4fe0fe3 100644 --- a/lib/View/JSON.php +++ b/lib/View/JSON.php @@ -173,9 +173,10 @@ class JSON extends View { * @param boolean $debug */ protected function addException(\Exception $exception) { + $exceptionType = explode('\\', get_class($exception)); $exceptionInfo = array( 'message' => $exception->getMessage(), - 'type' => get_class($exception), + 'type' => end($exceptionType), 'code' => $exception->getCode() ); @@ -211,6 +212,7 @@ class JSON extends View { $this->json['data']['uuid'] = $interpreter->getEntity()->getUuid(); $this->json['data']['count'] = count($data); + $this->json['data']['rowCount'] = $interpreter->getRowCount(); $min = $interpreter->getMin(); $max = $interpreter->getMax(); diff --git a/lib/View/XML.php b/lib/View/XML.php index 3ce4a06..6167b13 100644 --- a/lib/View/XML.php +++ b/lib/View/XML.php @@ -183,9 +183,11 @@ class XML extends View { * @param boolean $debug */ protected function addException(\Exception $exception) { + $exceptionType = explode('\\', get_class($exception)); + $xmlException = $this->xmlDoc->createElement('exception'); $xmlException->setAttribute('code', $exception->getCode()); - $xmlException->setAttribute('type', get_class($exception)); + $xmlException->setAttribute('type', end($exceptionType)); $xmlException->appendChild($this->xmlDoc->createElement('message', $exception->getMessage()));