Module: YmlErrorResponder::ErrorHandlers

Extended by:
ErrorHandlers
Included in:
ErrorHandlers
Defined in:
lib/yml_error_responder/error_handlers.rb,
lib/yml_error_responder/error_handlers/base_error_handler.rb,
lib/yml_error_responder/error_handlers/unknow_error_handler.rb,
lib/yml_error_responder/error_handlers/default_error_handler.rb

Defined Under Namespace

Classes: BaseErrorHandler, DefaultErrorHandler, UnknowErrorHandler

Instance Method Summary collapse

Instance Method Details

#handler(error, payload) ⇒ Object



9
10
11
# File 'lib/yml_error_responder/error_handlers.rb', line 9

def handler(error, payload)
  lookup_handler(error).new(error, payload)
end

#unknown_errorObject



5
6
7
# File 'lib/yml_error_responder/error_handlers.rb', line 5

def unknown_error
  UnknowErrorHandler.new
end