Sha256: 8681156081b7d8dddb8960e817763be1aa1858df819fc41de18b8ec81d998a86

Contents?: true

Size: 572 Bytes

Versions: 4

Compression:

Stored size: 572 Bytes

Contents

# frozen_string_literal: true
# encoding: utf-8

module Mongoid
  module Errors

    # This error is raised when attempting to create a new client that does
    # not have a named configuration.
    class NoClientConfig < MongoidError

      # Create the new error.
      #
      # @example Create the error.
      #   NoClientConfig.new(:secondary)
      #
      # @param [ String, Symbol ] name The name of the client.
      #
      # @since 3.0.0
      def initialize(name)
        super(compose_message("no_client_config", { name: name }))
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
mongoid-7.1.2 lib/mongoid/errors/no_client_config.rb
mongoid-7.1.1 lib/mongoid/errors/no_client_config.rb
mongoid-7.1.0 lib/mongoid/errors/no_client_config.rb
mongoid-7.1.0.rc0 lib/mongoid/errors/no_client_config.rb