Sha256: daf028f3d7999f96583ee3227a47a5fcfcf815c95b0d58466992119a5e6c8c2f

Contents?: true

Size: 637 Bytes

Versions: 9

Compression:

Stored size: 637 Bytes

Contents

# frozen_string_literal: true

module Mongoid
  module Errors

    # This error is raised when a client is configured without a database.
    class NoClientDatabase < MongoidError

      # Create the new error.
      #
      # @example Create the new error.
      #   NoClientDatabase.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_database",
            { 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_database.rb
mongoid-7.5.3 lib/mongoid/errors/no_client_database.rb
mongoid-7.5.2 lib/mongoid/errors/no_client_database.rb
mongoid-7.5.1 lib/mongoid/errors/no_client_database.rb
mongoid-7.4.3 lib/mongoid/errors/no_client_database.rb
mongoid-8.0.1 lib/mongoid/errors/no_client_database.rb
mongoid-7.5.0 lib/mongoid/errors/no_client_database.rb
mongoid-7.4.1 lib/mongoid/errors/no_client_database.rb
mongoid-7.4.0 lib/mongoid/errors/no_client_database.rb