lib/amq/protocol/client.rb in amq-protocol-0.7.0.alpha1 vs lib/amq/protocol/client.rb in amq-protocol-0.7.0.alpha2

- old
+ new

@@ -517,15 +517,11 @@ offset += length class_id = data[offset, 2].unpack(PACK_UINT16).first offset += 2 method_id = data[offset, 2].unpack(PACK_UINT16).first offset += 2 - if reply_code.eql?(200) - self.new(reply_code, reply_text, class_id, method_id) - else - raise Error[reply_code].new(reply_text) - end + self.new(reply_code, reply_text, class_id, method_id) end attr_reader :reply_code, :reply_text, :class_id, :method_id def initialize(reply_code, reply_text, class_id, method_id) @reply_code = reply_code @@ -723,14 +719,10 @@ offset += length class_id = data[offset, 2].unpack(PACK_UINT16).first offset += 2 method_id = data[offset, 2].unpack(PACK_UINT16).first offset += 2 - if reply_code.eql?(200) - self.new(reply_code, reply_text, class_id, method_id) - else - raise Error[reply_code].new(reply_text) - end + self.new(reply_code, reply_text, class_id, method_id) end attr_reader :reply_code, :reply_text, :class_id, :method_id def initialize(reply_code, reply_text, class_id, method_id) @reply_code = reply_code