def _check(self, err): if err < 0: exc = EXCEPTIONS.get(err, MessageException) raise exc("[%s]: %s" % (err, pn_error_text(pn_message_error(self._msg)))) else: return err
def _check(self, err): if err < 0: exc = EXCEPTIONS.get(err, TransportException) raise exc("[%s]: %s" % (err, pn_error_text(pn_transport_error(self._impl)))) else: return err
def _check(self, err): if err < 0: exc = EXCEPTIONS.get(err, DataException) raise exc("[%s]: %s" % (err, pn_error_text(pn_data_error(self._data)))) else: return err
def acceptor(self, host, port, handler=None): impl = _chandler(handler, self.on_error_delegate()) aimpl = pn_reactor_acceptor(self._impl, unicode2utf8(host), str(port), impl) pn_decref(impl) if aimpl: return Acceptor(aimpl) else: raise IOError("%s (%s:%s)" % (pn_error_text(pn_reactor_error(self._impl)), host, port))
def acceptor(self, host, port, handler=None): impl = _chandler(handler, self.on_error_delegate()) aimpl = pn_reactor_acceptor(self._impl, unicode2utf8(host), str(port), impl) pn_decref(impl) if aimpl: return Acceptor(aimpl) else: raise IOError("%s (%s:%s)" % (pn_error_text(pn_reactor_error(self._impl)), host, port))
def wakeup(self): n = pn_reactor_wakeup(self._impl) if n: raise IOError(pn_error_text(pn_reactor_error(self._impl)))
def _check(self, err): if err < 0: exc = EXCEPTIONS.get(err, LinkException) raise exc("[%s]: %s" % (err, pn_error_text(pn_link_error(self._impl)))) else: return err
def _check(self, err): if err < 0: exc = EXCEPTIONS.get(err, MessageException) raise exc("[%s]: %s" % (err, pn_error_text(pn_message_error(self._msg)))) else: return err
def wakeup(self): n = pn_reactor_wakeup(self._impl) if n: raise IOError(pn_error_text(pn_reactor_error(self._impl)))
def _check(self, err): if err < 0: exc = EXCEPTIONS.get(err, DataException) raise exc("[%s]: %s" % (err, pn_error_text(pn_data_error(self._data)))) else: return err