Sha256: a975f39b37314491df9e9cfb4ed20511facbb8f74f8820729978b11e55e5b72c
Contents?: true
Size: 597 Bytes
Versions: 2
Compression:
Stored size: 597 Bytes
Contents
module Kharon module Handlers # Errors handler that raises exception as soon as a problem is encountered during validation. # @author Vincent Courtois <courtois.vincent@outlook.com> class Exceptions include Singleton # Method used to report an error by raising the correct type of exception. # @param [Hash] error_hash a Hash describing the error. # @raises [Kharon::Errors::Validation] the exception raised when an error is encountered. def report_error(error_hash) raise Kharon::Errors::Validation.new(error_hash) end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
kharon-0.5.1 | lib/kharon/handlers/exceptions.rb |
kharon-0.5.0 | lib/kharon/handlers/exceptions.rb |