removed namespace from exception type

This commit is contained in:
Steffen Vogel 2011-03-16 12:11:52 +01:00
parent b783573d9e
commit ca92eaa5e7
2 changed files with 6 additions and 2 deletions

View file

@ -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();

View file

@ -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()));