Exception: Bunny::ConnectionClosedError

Inherits:
Exception
  • Object
show all
Defined in:
lib/bunny/exceptions.rb

Overview

Raised when a frame is sent over an already closed connection

Instance Method Summary collapse

Constructor Details

#initialize(frame) ⇒ ConnectionClosedError

Returns a new instance of ConnectionClosedError.



91
92
93
94
95
96
97
# File 'lib/bunny/exceptions.rb', line 91

def initialize(frame)
  if frame.respond_to?(:method_class)
    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