lib/rrj/janus/transactions/session.rb in ruby_rabbitmq_janus-2.0.0 vs lib/rrj/janus/transactions/session.rb in ruby_rabbitmq_janus-2.1.0.pre.128

- old
+ new

@@ -14,25 +14,31 @@ # @param [Fixnum] session # Use a session identifier for created message def initialize(exclusive, session) super(session) @exclusive = exclusive + rescue + raise Errors::Janus::TransactionSession::Initialize end # Opening a short transaction with rabbitmq and close when is ending # # @yield Send a message to Janus def connect rabbit.transaction_short do choose_queue yield end + rescue + raise Errors::Janus::TransactionSession::Connect end def publish_message(type, options = {}) msg = Janus::Messages::Standard.new(type, opts.merge!(options)) response = read_response(publisher.publish(msg)) Janus::Responses::Standard.new(response) + rescue + raise Errors::Janus::TransactionSession::PublishMessage end private def opts