Exception: Mongoid::Errors::NoSessionDatabase

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

Overview

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

Constant Summary

Constants inherited from MongoidError

MongoidError::BASE_KEY

Instance Method Summary collapse

Methods inherited from MongoidError

#compose_message

Constructor Details

#initialize(name, config) ⇒ NoSessionDatabase

Create the new error.

Examples:

Create the new error.

NoSessionDatabase.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_database.rb', line 17

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