Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
class AuthenticationError(AMQPConnectionError):
reason = (
"Server and client could not negotiate use of the "
"authentication mechanisms. Server supports only %r, "
"but client supports only %r."
)
class ProbableAuthenticationError(AMQPConnectionError):
reason = (
"Client was disconnected at a connection stage indicating a "
"probable authentication error: %s"
)
class ConnectionClosed(AMQPConnectionError):
reason = "The AMQP connection was closed (%s) %s"
class ConnectionSyntaxError(ConnectionClosed):
reason = (
"The sender sent a frame that contained illegal values for "
"one or more fields. This strongly implies a programming error "
"in the sending peer: %r"
)
class ConnectionFrameError(ConnectionClosed):
reason = (
"The sender sent a malformed frame that the recipient could "
"not decode. This strongly implies a programming error "
"in the sending peer: %r"
class AMQPError(Exception):
reason = "An unspecified AMQP error has occurred: %s"
def __repr__(self):
return "<%s: %s>" % (self.__class__.__name__, self.reason % self.args)
# Backward compatibility
AMQPException = AMQPError
class AMQPConnectionError(AMQPError):
reason = "Connection can not be opened"
class IncompatibleProtocolError(AMQPConnectionError):
reason = "The protocol returned by the server is not supported"
class AuthenticationError(AMQPConnectionError):
reason = (
"Server and client could not negotiate use of the "
"authentication mechanisms. Server supports only %r, "
"but client supports only %r."
)
class ProbableAuthenticationError(AMQPConnectionError):
reason = (
"Client was disconnected at a connection stage indicating a "
"probable authentication error: %s"
)
return "<%s: %s>" % (self.__class__.__name__, self.reason % self.args)
# Backward compatibility
AMQPException = AMQPError
class AMQPConnectionError(AMQPError):
reason = "Connection can not be opened"
class IncompatibleProtocolError(AMQPConnectionError):
reason = "The protocol returned by the server is not supported"
class AuthenticationError(AMQPConnectionError):
reason = (
"Server and client could not negotiate use of the "
"authentication mechanisms. Server supports only %r, "
"but client supports only %r."
)
class ProbableAuthenticationError(AMQPConnectionError):
reason = (
"Client was disconnected at a connection stage indicating a "
"probable authentication error: %s"
)
class ConnectionClosed(AMQPConnectionError):
reason = "The AMQP connection was closed (%s) %s"
reason = "Connection can not be opened"
class IncompatibleProtocolError(AMQPConnectionError):
reason = "The protocol returned by the server is not supported"
class AuthenticationError(AMQPConnectionError):
reason = (
"Server and client could not negotiate use of the "
"authentication mechanisms. Server supports only %r, "
"but client supports only %r."
)
class ProbableAuthenticationError(AMQPConnectionError):
reason = (
"Client was disconnected at a connection stage indicating a "
"probable authentication error: %s"
)
class ConnectionClosed(AMQPConnectionError):
reason = "The AMQP connection was closed (%s) %s"
class ConnectionSyntaxError(ConnectionClosed):
reason = (
"The sender sent a frame that contained illegal values for "
"one or more fields. This strongly implies a programming error "
"in the sending peer: %r"
)