Exception: Filterameter::Exceptions::ValidationError
- Inherits:
-
FilterameterError
- Object
- StandardError
- FilterameterError
- Filterameter::Exceptions::ValidationError
- Defined in:
- lib/filterameter/exceptions/validation_error.rb
Overview
# Validation Error
Class ValidationError is raised when a specified parameter fails a validation. Configuration setting ‘action_on_validation_failure` determines whether or not the exception is raised.
Instance Attribute Summary collapse
-
#errors ⇒ Object
readonly
Returns the value of attribute errors.
Instance Method Summary collapse
-
#initialize(errors) ⇒ ValidationError
constructor
A new instance of ValidationError.
- #message ⇒ Object
Constructor Details
#initialize(errors) ⇒ ValidationError
Returns a new instance of ValidationError.
12 13 14 15 |
# File 'lib/filterameter/exceptions/validation_error.rb', line 12 def initialize(errors) super @errors = errors end |
Instance Attribute Details
#errors ⇒ Object (readonly)
Returns the value of attribute errors.
10 11 12 |
# File 'lib/filterameter/exceptions/validation_error.rb', line 10 def errors @errors end |
Instance Method Details
#message ⇒ Object
17 18 19 |
# File 'lib/filterameter/exceptions/validation_error.rb', line 17 def "The following parameter(s) failed validation: #{errors.}" end |