Exception: Mongoid::Errors::InvalidSessionUse

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

Overview

This error is raised when a session is attempted to be used with a model whose client cannot use it, if

sessions are nested, or if the mongodb deployment doesn't support sessions.

Since:

  • 6.4.0

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(error_type) ⇒ InvalidSessionUse

Create the error.

Examples:

Create the error.

InvalidSessionUse.new(:invalid_session_use)

Parameters:

  • error_type (:invalid_sesion_use, :invalid_session_nesting)

    The type of session misuse.

Since:

  • 6.4.0



21
22
23
# File 'build/mongoid-7.3/lib/mongoid/errors/invalid_session_use.rb', line 21

def initialize(error_type)
  super(compose_message(error_type.to_s))
end