lib/bunny/exceptions.rb in bunny-0.9.0.pre5 vs lib/bunny/exceptions.rb in bunny-0.9.0.pre6
- old
+ new
@@ -14,13 +14,13 @@
end
class ConnectionClosedError < StandardError
def initialize(frame)
if frame.respond_to?(:method_class)
- super("Trying to send frame through a closed connection. Frame is #{frame.inspect}")
- else
super("Trying to send frame through a closed connection. Frame is #{frame.inspect}, method class is #{frame.method_class}")
+ else
+ super("Trying to send frame through a closed connection. Frame is #{frame.inspect}")
end
end
end
class PossibleAuthenticationFailureError < StandardError
@@ -42,11 +42,10 @@
# backwards compatibility
ConnectionError = TCPConnectionFailed
ServerDownError = TCPConnectionFailed
- # TODO
class ForcedChannelCloseError < StandardError; end
class ForcedConnectionCloseError < StandardError; end
class MessageError < StandardError; end
class ProtocolError < StandardError; end
@@ -128,7 +127,13 @@
@connection_close = connection_close
end
end
class ChannelError < ConnectionLevelException
+ end
+
+ class InvalidCommand < ConnectionLevelException
+ end
+
+ class UnexpectedFrame < ConnectionLevelException
end
end