Exception: ApimaticCalculator::ValidationException
- Inherits:
-
StandardError
- Object
- StandardError
- ApimaticCalculator::ValidationException
- Defined in:
- lib/apimatic_calculator/exceptions/validation_exception.rb
Overview
Class for exceptions when there is a schema validation error.
Instance Attribute Summary collapse
-
#reason ⇒ Object
readonly
Returns the value of attribute reason.
Instance Method Summary collapse
-
#initialize(value, template) ⇒ ValidationException
constructor
The constructor.
Constructor Details
#initialize(value, template) ⇒ ValidationException
The constructor.
13 14 15 16 |
# File 'lib/apimatic_calculator/exceptions/validation_exception.rb', line 13 def initialize(value, template) @reason = "The value #{value} provided doesn't validate against the schema #{template}" super(reason) end |
Instance Attribute Details
#reason ⇒ Object (readonly)
Returns the value of attribute reason.
9 10 11 |
# File 'lib/apimatic_calculator/exceptions/validation_exception.rb', line 9 def reason @reason end |