public function paintException($exception)
    {
        if (! $this->fail && ! $this->error) {
            $this->error = true;
            $message     = 'Unexpected exception of type[' . get_class($exception) .
                    '] with message [' . $exception->getMessage() . '] in [' .
                    $exception->getFile() . ' line ' . $exception->getLine() . ']';
            $this->message = self::escapeVal($message);
            $this->listener->write(
                    '{status:"error",message:"' . $this->message . '",group:"' . $this->group .
                    '",case:"' . $this->case . '",method:"' . $this->method. '"}'
            );
        }
    }