Class: Kharon::Handlers::Exceptions

Inherits:
Object
  • Object
show all
Includes:
Singleton
Defined in:
lib/kharon/handlers/exceptions.rb

Overview

Errors handler that raises exception as soon as a problem is encountered during validation.

Author:

Instance Method Summary (collapse)

Instance Method Details

- (Object) report_error(error_hash)

Method used to report an error by raising the correct type of exception.

Parameters:

  • error_hash (Hash)

    a Hash describing the error.

Raises:



14
15
16
# File 'lib/kharon/handlers/exceptions.rb', line 14

def report_error(error_hash)
  raise Kharon::Errors::Validation.new(error_hash)
end