code: public function paintException($exception)
      {
          parent::paintException($exception);
          print $this->getIndent(1);
          print '<' . $this->namespace . 'exception>';
          $message = 'Unexpected exception of type [' . get_class($exception) .
                  '] with message [' . $exception->getMessage() .
                  '] in [' . $exception->getFile() .
                  ' line ' . $exception->getLine() . ']';
          print $this->toParsedXml($message);
          print '</' . $this->namespace . "exception>\n";
      }
docs: Paints exception as XML.
  
  @param Exception $exception    Exception to encode.