Exception: Kharon::Errors::Validation
- Inherits:
-
Exception
- Object
- Exception
- Kharon::Errors::Validation
- Defined in:
- lib/kharon/errors/validation.rb
Overview
Standard exception raised in case the exceptions are used, and there is an error in the validation.
Instance Attribute Summary collapse
-
#error_hash ⇒ Hash
The description of the encountered error as a Hash.
Instance Method Summary collapse
-
#initialize(error_hash) ⇒ Validation
constructor
Constructor of the class.
-
#message ⇒ String
Generates a JSON version of the encountered error description hash.
Constructor Details
#initialize(error_hash) ⇒ Validation
Constructor of the class.
16 17 18 |
# File 'lib/kharon/errors/validation.rb', line 16 def initialize(error_hash) @error_hash = error_hash end |
Instance Attribute Details
#error_hash ⇒ Hash
Returns the description of the encountered error as a Hash.
|
|
# File 'lib/kharon/errors/validation.rb', line 10
|
Instance Method Details
#message ⇒ String
Generates a JSON version of the encountered error description hash.
22 23 24 |
# File 'lib/kharon/errors/validation.rb', line 22 def JSON.generate(error_hash) end |