Exception: Mongoid::Errors::NoClientDatabase

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

Overview

This error is raised when a client is configured without a database.

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, config) ⇒ NoClientDatabase

Create the new error.

Examples:

Create the new error.

NoClientDatabase.new(:default, {}})

Parameters:

  • name (Symbol, String)

    The db config key.

  • config (Hash)

    The hash configuration options.

Since:

  • 3.0.0



19
20
21
22
23
24
25
26
# File 'build/mongoid-master/lib/mongoid/errors/no_client_database.rb', line 19

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