'Test that raising an exception replies with the original stanza.'

def testExceptionReply(self):

    def message(msg):
        msg.reply()
        msg['body'] = 'Body    changed'
        raise XMPPError(clear=False)
    self.stream_start()
    self.xmpp.add_event_handler('message', message)
    self.recv('\n                                        <message>\n                                                <body>This    is    going    to    cause    an    error.</body>\n                                        </message>\n                                ')
    self.send('\n                                        <message    type="error">\n                                                <body>This    is    going    to    cause    an    error.</body>\n                                                <error    type="cancel"    code="500">\n                                                        <undefined-condition\n                                                                        xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"    />\n                                                </error>\n                                        </message>\n                                ')
