move exception from KVMessage() to toXML()