Exception: Mongoid::Errors::NoSessionConfig

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

Overview

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

Constant Summary

Constants inherited from MongoidError

MongoidError::BASE_KEY

Instance Method Summary collapse

Methods inherited from MongoidError

#compose_message

Constructor Details

#initialize(name) ⇒ NoSessionConfig

Create the new error.

Examples:

Create the error.

NoSessionConfig.new(:secondary)

Parameters:

  • name (String, Symbol)

    The name of the session.

Since:

  • 3.0.0



17
18
19
# File 'lib/mongoid/errors/no_session_config.rb', line 17

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