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-3.0.0.pre.330 lib/rrj/errors/rabbit/connect.rb
ruby_rabbitmq_janus-3.0.0.pre.328 lib/rrj/errors/rabbit/connect.rb
ruby_rabbitmq_janus-3.0.0.pre.327 lib/rrj/errors/rabbit/connect.rb
ruby_rabbitmq_janus-2.7.2 lib/rrj/errors/rabbit/connect.rb
ruby_rabbitmq_janus-2.7.2.pre.322 lib/rrj/errors/rabbit/connect.rb
ruby_rabbitmq_janus-2.7.2.pre.320 lib/rrj/errors/rabbit/connect.rb
ruby_rabbitmq_janus-2.7.2.pre.319 lib/rrj/errors/rabbit/connect.rb
ruby_rabbitmq_janus-2.7.2.pre.318 lib/rrj/errors/rabbit/connect.rb
ruby_rabbitmq_janus-2.7.2.pre.317 lib/rrj/errors/rabbit/connect.rb
ruby_rabbitmq_janus-2.7.2.pre.316 lib/rrj/errors/rabbit/connect.rb
ruby_rabbitmq_janus-2.7.2.pre.315 lib/rrj/errors/rabbit/connect.rb
ruby_rabbitmq_janus-2.7.2.pre.314 lib/rrj/errors/rabbit/connect.rb
ruby_rabbitmq_janus-2.7.2.pre.312 lib/rrj/errors/rabbit/connect.rb
ruby_rabbitmq_janus-2.7.2.pre.310 lib/rrj/errors/rabbit/connect.rb
ruby_rabbitmq_janus-2.7.2.pre.309 lib/rrj/errors/rabbit/connect.rb
ruby_rabbitmq_janus-2.7.2.pre.308 lib/rrj/errors/rabbit/connect.rb
ruby_rabbitmq_janus-2.7.2.pre.307 lib/rrj/errors/rabbit/connect.rb
ruby_rabbitmq_janus-2.7.2.pre.306 lib/rrj/errors/rabbit/connect.rb
ruby_rabbitmq_janus-2.7.2.pre.305 lib/rrj/errors/rabbit/connect.rb
ruby_rabbitmq_janus-2.7.2.pre.302 lib/rrj/errors/rabbit/connect.rb