removed namespace from exception type
This commit is contained in:
parent
b783573d9e
commit
ca92eaa5e7
2 changed files with 6 additions and 2 deletions
|
@ -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();
|
||||
|
|
|
@ -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()));
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue