Files
metasploit-gs/lib/rex/proto/amqp/error.rb
T
Spencer McIntyre 26d0f77379 Add the AMQP client
2023-03-23 17:28:53 -04:00

29 lines
773 B
Ruby

module Rex::Proto::Amqp::Error
# Base class of AMQP-specific errors.
class AmqpError < Rex::RuntimeError
end
# Raised when trying to parse a frame that is invalid.
class InvalidFrameError < AmqpError
def initialize(msg='Invalid AMQP frame data was received and could not be parsed.')
super(msg)
end
end
# Raised when an unexpected reply is received.
class UnexpectedReplyError < AmqpError
attr_reader :reply
def initialize(reply, msg='An unexpected AMQP reply was received.')
@reply = reply
super(msg)
end
end
# Raised when the connection can not be negotiated for some reason.
class NegotiationError < AmqpError
def initialize(msg='AMQP Connection negotiation failed.')
super(msg)
end
end
end