Exception: Mongoid::Locker::Errors::MongoidLockerError

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

Overview

Default parent Mongoid::Locker error for all custom errors.

Direct Known Subclasses

DocumentCouldNotGetLock, InvalidParameter

Constant Summary collapse

BASE_KEY =
'mongoid.locker.errors.messages'

Instance Method Summary collapse

Constructor Details

#initialize(key, **params) ⇒ MongoidLockerError

Returns a new instance of MongoidLockerError.



10
11
12
13
14
# File 'lib/mongoid/locker/errors.rb', line 10

def initialize(key, **params)
  message = I18n.translate("#{BASE_KEY}.#{key}.message", **params)

  super("\nmessage:\n  #{message}")
end