Exception: Filterameter::Exceptions::UndeclaredParameterError

Inherits:
FilterameterError
  • Object
show all
Defined in:
lib/filterameter/exceptions/undeclared_parameter_error.rb

Overview

# Undeclared Parameter Error

Class UndeclaredParameterError is raised when a request contains filter parameters that have not been declared. Configuration setting ‘action_on_undeclared_parameters` determines whether or not the exception is raised.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(key) ⇒ UndeclaredParameterError

Returns a new instance of UndeclaredParameterError.



12
13
14
15
# File 'lib/filterameter/exceptions/undeclared_parameter_error.rb', line 12

def initialize(key)
  super
  @key = key
end

Instance Attribute Details

#keyObject (readonly)

Returns the value of attribute key.



10
11
12
# File 'lib/filterameter/exceptions/undeclared_parameter_error.rb', line 10

def key
  @key
end

Instance Method Details

#messageObject



17
18
19
# File 'lib/filterameter/exceptions/undeclared_parameter_error.rb', line 17

def message
  "The following filter parameter has not been declared: #{key}"
end