Sha256: 6aba6920c9d65782708234c4fbd529fac696fbc64676f3e869b93e9a09af4fe6

Contents?: true

Size: 646 Bytes

Versions: 9

Compression:

Stored size: 646 Bytes

Contents

# frozen_string_literal: true

module Mongoid
  module Errors

    # 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.
    class InvalidSessionUse < MongoidError

      # Create the error.
      #
      # @example Create the error.
      #   InvalidSessionUse.new(:invalid_session_use)
      #
      # @param [ :invalid_session_use, :invalid_session_nesting ] error_type The type of session misuse.
      def initialize(error_type)
        super(compose_message(error_type.to_s))
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
mongoid-7.5.4 lib/mongoid/errors/invalid_session_use.rb
mongoid-7.5.3 lib/mongoid/errors/invalid_session_use.rb
mongoid-7.5.2 lib/mongoid/errors/invalid_session_use.rb
mongoid-7.5.1 lib/mongoid/errors/invalid_session_use.rb
mongoid-7.4.3 lib/mongoid/errors/invalid_session_use.rb
mongoid-8.0.1 lib/mongoid/errors/invalid_session_use.rb
mongoid-7.5.0 lib/mongoid/errors/invalid_session_use.rb
mongoid-7.4.1 lib/mongoid/errors/invalid_session_use.rb
mongoid-7.4.0 lib/mongoid/errors/invalid_session_use.rb