Sha256: 6e476318861a9eea4df1310afb9923cdc7ff2a0a749647602d6223eb3ff5cd5d

Contents?: true

Size: 1.79 KB

Versions: 81

Compression:

Stored size: 1.79 KB

Contents

# frozen_string_literal: true

module RubyRabbitmqJanus
  module Errors
    module Rabbit
      # Define a super class for all error in Option class
      class BaseConnect < BaseRabbit
        def initialize(message, level = :fatal)
          super("[Connect] #{message}", level)
        end
      end

      module Connect
        # Error for Rabbit::Connect#initialize
        class Initialize < RubyRabbitmqJanus::Errors::Rabbit::BaseConnect
          def initialize(error)
            super "Error in initializer #{error}"
          end
        end

        # Error for Rabbit::Connect#transaction_short
        class TransactionShort < RubyRabbitmqJanus::Errors::Rabbit::BaseConnect
          def initialize(error)
            super "Error during transaction with RabbitMQ #{error}"
          end
        end

        # Error for Rabbit::Connect#transaction_long
        class TransactionLong < RubyRabbitmqJanus::Errors::Rabbit::BaseConnect
          def initialize(error)
            super "Error during transaction with RabbitMQ #{error}"
          end
        end

        # Error for Rabbit::Connect#start
        class Start < RubyRabbitmqJanus::Errors::Rabbit::BaseConnect
          def initialize(error)
            super "Error for starting connection with RabbitMQ #{error}"
          end
        end

        # Error for Rabbit::Connect#close
        class Close < RubyRabbitmqJanus::Errors::Rabbit::BaseConnect
          def initialize(error)
            super "Error for closing connection with RabbitMQ #{error}"
          end
        end

        # Error for Rabbit::Connect#channel
        class Channel < RubyRabbitmqJanus::Errors::Rabbit::BaseConnect
          def initialize(error)
            super "Error for create channel in RabbitMQ instance #{error}"
          end
        end
      end
    end
  end
end

Version data entries

81 entries across 81 versions & 1 rubygems

Version Path
ruby_rabbitmq_janus-2.7.2.pre.297 lib/rrj/errors/rabbit/connect.rb
ruby_rabbitmq_janus-2.7.2.pre.296 lib/rrj/errors/rabbit/connect.rb
ruby_rabbitmq_janus-2.7.2.pre.286 lib/rrj/errors/rabbit/connect.rb
ruby_rabbitmq_janus-2.7.2.pre.285 lib/rrj/errors/rabbit/connect.rb
ruby_rabbitmq_janus-2.7.2.pre.284 lib/rrj/errors/rabbit/connect.rb
ruby_rabbitmq_janus-2.7.1 lib/rrj/errors/rabbit/connect.rb
ruby_rabbitmq_janus-2.7.1.pre.274 lib/rrj/errors/rabbit/connect.rb
ruby_rabbitmq_janus-2.7.0.pre.272 lib/rrj/errors/rabbit/connect.rb
ruby_rabbitmq_janus-2.7.0 lib/rrj/errors/rabbit/connect.rb
ruby_rabbitmq_janus-2.7.0.pre.269 lib/rrj/errors/rabbit/connect.rb
ruby_rabbitmq_janus-2.7.0.pre.267 lib/rrj/errors/rabbit/connect.rb
ruby_rabbitmq_janus-2.6.0 lib/rrj/errors/rabbit/connect.rb
ruby_rabbitmq_janus-2.6.0.pre.263 lib/rrj/errors/rabbit/connect.rb
ruby_rabbitmq_janus-2.6.0.pre.261 lib/rrj/errors/rabbit/connect.rb
ruby_rabbitmq_janus-2.6.0.pre.260 lib/rrj/errors/rabbit/connect.rb
ruby_rabbitmq_janus-2.6.0.pre.259 lib/rrj/errors/rabbit/connect.rb
ruby_rabbitmq_janus-2.6.0.pre.258 lib/rrj/errors/rabbit/connect.rb
ruby_rabbitmq_janus-2.6.0.pre.247 lib/rrj/errors/rabbit/connect.rb
ruby_rabbitmq_janus-2.6.0.pre.246 lib/rrj/errors/rabbit/connect.rb
ruby_rabbitmq_janus-2.6.0.pre.244 lib/rrj/errors/rabbit/connect.rb