Exception: Mongoid::Errors::NoSessionHosts

Inherits:
MongoidError
  • Object
show all
Defined in:
lib/mongoid/errors/no_session_hosts.rb

Overview

This error is raised when a session is configured without hosts.

Constant Summary

Constants inherited from MongoidError

MongoidError::BASE_KEY

Instance Method Summary collapse

Methods inherited from MongoidError

#compose_message

Constructor Details

#initialize(name, config) ⇒ NoSessionHosts

Create the new error.

Examples:

Create the new error.

NoSessionHosts.new(:default, {}})

Parameters:

  • name (Symbol, String)

    The db config key.

  • config (Hash)

    The hash configuration options.

Since:

  • 3.0.0



17
18
19
20
21
22
23
24
# File 'lib/mongoid/errors/no_session_hosts.rb', line 17

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