Sha256: 73336a5371ae2983a62a46d709985e1a3f2fda6e99a9df0638634f857f4c1141

Contents?: true

Size: 1.61 KB

Versions: 106

Compression:

Stored size: 1.61 KB

Contents

# frozen_string_literal: true

module RubyRabbitmqJanus
  module Errors
    module Janus
      # Define a super class for error in Janus::Transactions::TransactionHandle
      class BaseTransactionHandle < BaseTransaction
        def initialize(message, level = :fatal)
          super "[Handle] #{message}", level
        end
      end

      module TransactionHandle
        # Error for Janus::Transactions::TransactionHandle#initialize
        class Initialize < Errors::Janus::BaseTransactionHandle
          def initialize
            super 'Error in initializer'
          end
        end

        # Error for Janus::Transactions::TransactionHandle#connect
        class Connect < Errors::Janus::BaseTransactionHandle
          def initialize
            super 'Error for connect to RabbitMQ'
          end
        end

        # Error for Janus::Transactions::TransactionHandle#publish_message
        class PublishMessage < Errors::Janus::BaseTransactionHandle
          def initialize
            super 'Error for publishing message'
          end
        end

        # Error for Janus::Transactions::TransactionHandle#detach
        class Detach < Errors::Janus::BaseTransactionHandle
          def initialize
            super 'Error for sending message to type detach'
          end
        end

        # Error for Janus::Transactions::TransactionHandle#detach_for_deleteing
        class DetachForDeleting < Errors::Janus::BaseTransactionHandle
          def initialize
            super 'Error for sending message detach ' \
                  'and update in database Janus instance'
          end
        end
      end
    end
  end
end

Version data entries

106 entries across 106 versions & 1 rubygems

Version Path
ruby_rabbitmq_janus-3.0.0 lib/rrj/errors/janus/transactions/handle.rb
ruby_rabbitmq_janus-3.0.0.pre.387 lib/rrj/errors/janus/transactions/handle.rb
ruby_rabbitmq_janus-3.0.0.pre.385 lib/rrj/errors/janus/transactions/handle.rb
ruby_rabbitmq_janus-3.0.0.pre.384 lib/rrj/errors/janus/transactions/handle.rb
ruby_rabbitmq_janus-3.0.0.pre.382 lib/rrj/errors/janus/transactions/handle.rb
ruby_rabbitmq_janus-3.0.0.pre.366 lib/rrj/errors/janus/transactions/handle.rb
ruby_rabbitmq_janus-3.0.0.pre.364 lib/rrj/errors/janus/transactions/handle.rb
ruby_rabbitmq_janus-3.0.0.pre.358 lib/rrj/errors/janus/transactions/handle.rb
ruby_rabbitmq_janus-3.0.0.pre.354 lib/rrj/errors/janus/transactions/handle.rb
ruby_rabbitmq_janus-3.0.0.pre.352 lib/rrj/errors/janus/transactions/handle.rb
ruby_rabbitmq_janus-3.0.0.pre.351 lib/rrj/errors/janus/transactions/handle.rb
ruby_rabbitmq_janus-3.0.0.pre.336 lib/rrj/errors/janus/transactions/handle.rb
ruby_rabbitmq_janus-3.0.0.pre.335 lib/rrj/errors/janus/transactions/handle.rb
ruby_rabbitmq_janus-3.0.0.pre.334 lib/rrj/errors/janus/transactions/handle.rb
ruby_rabbitmq_janus-3.0.0.pre.330 lib/rrj/errors/janus/transactions/handle.rb
ruby_rabbitmq_janus-3.0.0.pre.328 lib/rrj/errors/janus/transactions/handle.rb
ruby_rabbitmq_janus-3.0.0.pre.327 lib/rrj/errors/janus/transactions/handle.rb
ruby_rabbitmq_janus-2.7.2 lib/rrj/errors/janus/transactions/handle.rb
ruby_rabbitmq_janus-2.7.2.pre.322 lib/rrj/errors/janus/transactions/handle.rb
ruby_rabbitmq_janus-2.7.2.pre.320 lib/rrj/errors/janus/transactions/handle.rb