class Kharon::Handlers::Exceptions
Errors
handler that raises exception as soon as a problem is encountered during validation. @author Vincent Courtois <courtois.vincent@outlook.com>
Public Instance Methods
report_error(error_hash)
click to toggle source
Method used to report an error by raising the correct type of exception. @param [Hash] error_hash a Hash describing the error. @raise [Kharon::Errors::Validation] the exception raised when an error is encountered.
# File lib/kharon/handlers/exceptions.rb, line 14 def report_error(error_hash) raise Kharon::Errors::Validation.new(error_hash) end