Sha256: 9a656858311214d83ce108c32a898cdc589cbee6d7e1a35b74751551245efcf5

Contents?: true

Size: 623 Bytes

Versions: 9

Compression:

Stored size: 623 Bytes

Contents

# frozen_string_literal: true

module Mongoid
  module Errors

    # This error is raised when a client is configured without hosts.
    class NoClientHosts < MongoidError

      # Create the new error.
      #
      # @example Create the new error.
      #   NoClientHosts.new(:default, {}})
      #
      # @param [ Symbol, String ] name The db config key.
      # @param [ Hash ] config The hash configuration options.
      def initialize(name, config)
        super(
          compose_message(
            "no_client_hosts",
            { name: name, config: config }
          )
        )
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
mongoid-7.5.4 lib/mongoid/errors/no_client_hosts.rb
mongoid-7.5.3 lib/mongoid/errors/no_client_hosts.rb
mongoid-7.5.2 lib/mongoid/errors/no_client_hosts.rb
mongoid-7.5.1 lib/mongoid/errors/no_client_hosts.rb
mongoid-7.4.3 lib/mongoid/errors/no_client_hosts.rb
mongoid-8.0.1 lib/mongoid/errors/no_client_hosts.rb
mongoid-7.5.0 lib/mongoid/errors/no_client_hosts.rb
mongoid-7.4.1 lib/mongoid/errors/no_client_hosts.rb
mongoid-7.4.0 lib/mongoid/errors/no_client_hosts.rb