#!/usr/bin/python
# -*- coding: utf-8 -*-

from slixmpp.exceptions import IqError, IqTimeout

class XmppIq:

    async def send(iq, timeout):
        try:
            await iq.send(timeout=timeout)
        except IqError as e:
            raise Exception('IQ Error!')
            print(str(e))
        except IqTimeout as e:
            raise Exception('IQ Timeout!')
            print(str(e))
        except Exception as e:
            raise Exception('Error!')
            print(str(e))