Exception: Mongoid::Errors::NoClientConfig

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

Overview

This error is raised when attempting to create a new client that does not have a named configuration.

Constant Summary

Constants inherited from MongoidError

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) ⇒ NoClientConfig

Create the new error.

Examples:

Create the error.

NoClientConfig.new(:secondary)

Parameters:

  • name (String, Symbol)

    The name of the client.

Since:

  • 3.0.0



17
18
19
# File 'build/mongoid-7.0/lib/mongoid/errors/no_client_config.rb', line 17

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