Exception: Mongoid::Locker::Errors::DocumentCouldNotGetLock

Inherits:
MongoidLockerError
  • Object
show all
Defined in:
lib/mongoid/locker/errors.rb

Overview

Raised when a document could not be successfully locked in the database.

Constant Summary collapse

KEY =
'document_could_not_get_lock'

Constants inherited from MongoidLockerError

MongoidLockerError::BASE_KEY

Instance Method Summary collapse

Constructor Details

#initialize(klass, id) ⇒ DocumentCouldNotGetLock

Returns a new instance of DocumentCouldNotGetLock.

Examples:

Create new error.

DocumentCouldNotGetLock.new(, '1234')


26
27
28
# File 'lib/mongoid/locker/errors.rb', line 26

def initialize(klass, id)
  super(KEY, klass: klass, id: id.to_s)
end