mirror of https://github.com/celery/kombu.git
Change exception to something subclassed from KombuError
This commit is contained in:
parent
68075277dc
commit
2055e495e7
|
@ -110,6 +110,8 @@ class Connection(object):
|
|||
>>> conn.release()
|
||||
|
||||
"""
|
||||
SSLNotSupported = exceptions.SSLNotSupported
|
||||
|
||||
port = None
|
||||
virtual_host = '/'
|
||||
connect_timeout = 5
|
||||
|
@ -234,7 +236,7 @@ class Connection(object):
|
|||
self.heartbeat = heartbeat and float(heartbeat)
|
||||
|
||||
if ssl and transport == 'librabbitmq':
|
||||
raise Exception('SSL not supported for "librabbitmq" transport')
|
||||
raise self.SSLNotSupported(transport)
|
||||
|
||||
def _debug(self, msg, *args, **kwargs):
|
||||
fmt = '[Kombu connection:0x%(id)x] %(msg)s'
|
||||
|
|
|
@ -45,6 +45,8 @@ class ChannelLimitExceeded(LimitExceeded):
|
|||
"""Maximum number of simultaneous channels exceeded."""
|
||||
pass
|
||||
|
||||
class SSLNotSupported(KombuError):
|
||||
pass
|
||||
|
||||
class StdConnectionError(KombuError):
|
||||
pass
|
||||
|
|
Loading…
Reference in New Issue