CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In
rapid7

Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.

GitHub Repository: rapid7/metasploit-framework
Path: blob/master/lib/rex/proto/amqp/error.rb
Views: 11704
1
module Rex::Proto::Amqp::Error
2
# Base class of AMQP-specific errors.
3
class AmqpError < Rex::RuntimeError
4
end
5
6
# Raised when trying to parse a frame that is invalid.
7
class InvalidFrameError < AmqpError
8
def initialize(msg='Invalid AMQP frame data was received and could not be parsed.')
9
super(msg)
10
end
11
end
12
13
# Raised when an unexpected reply is received.
14
class UnexpectedReplyError < AmqpError
15
attr_reader :reply
16
def initialize(reply, msg='An unexpected AMQP reply was received.')
17
@reply = reply
18
super(msg)
19
end
20
end
21
22
# Raised when the connection can not be negotiated for some reason.
23
class NegotiationError < AmqpError
24
def initialize(msg='AMQP Connection negotiation failed.')
25
super(msg)
26
end
27
end
28
end
29
30