Exception: Mongoid::Locker::Errors::InvalidParameter

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

Overview

Raised when trying to pass an invalid parameter to locker method by a class.

Constant Summary collapse

KEY =
'invalid_parameter'

Constants inherited from MongoidLockerError

MongoidLockerError::BASE_KEY

Instance Method Summary collapse

Constructor Details

#initialize(klass, parameter) ⇒ InvalidParameter

Returns a new instance of InvalidParameter.

Examples:

Create new error.

InvalidParameter.new(User, :lock_timeout)

Parameters:

  • klass (Class)

    the model class

  • parameter (String, Symbol)

    the class parameter



40
41
42
# File 'lib/mongoid/locker/errors.rb', line 40

def initialize(klass, parameter)
  super(KEY, klass: klass, parameter: parameter)
end