Exception: Mongoid::Errors::MixedClientConfiguration

Inherits:
MongoidError
  • Object
show all
Defined in:
build/mongoid-8.1/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.



17
18
19
20
21
22
23
24
# File 'build/mongoid-8.1/lib/mongoid/errors/mixed_client_configuration.rb', line 17

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