Exception: Mongoid::Errors::MixedClientConfiguration

Inherits:
MongoidError
  • Object
show all
Defined in:
build/mongoid-7.3/lib/mongoid/errors/mixed_client_configuration.rb

Overview

This error is raised when a client configuration contains both a uri and other standard options.

Constant Summary

Constants inherited from MongoidError

Mongoid::Errors::MongoidError::BASE_KEY

Instance Attribute Summary

Attributes inherited from MongoidError

#problem, #resolution, #summary

Instance Method Summary collapse

Methods inherited from MongoidError

#compose_message

Constructor Details

#initialize(name, config) ⇒ MixedClientConfiguration

Initialize the error.

Examples:

Initialize the error.

MixedClientConfiguration.new(:name, {})

Parameters:

  • name (Symbol)

    The name of the client config.

  • config (Hash)

    The configuration options.

Since:

  • 3.0.0



20
21
22
23
24
25
26
27
# File 'build/mongoid-7.3/lib/mongoid/errors/mixed_client_configuration.rb', line 20

def initialize(name, config)
  super(
    compose_message(
      "mixed_client_configuration",
      { name: name, config: config }
    )
  )
end