Class: Funktor::ErrorHandler::Logger

Inherits:
Object
  • Object
show all
Defined in:
lib/funktor/error_handler.rb

Instance Method Summary collapse

Instance Method Details

#call(error, context) ⇒ Object



4
5
6
7
8
# File 'lib/funktor/error_handler.rb', line 4

def call(error, context)
  Funktor.logger.warn(Funktor.dump_json(context)) if context
  Funktor.logger.warn("#{error.class.name}: #{error.message}")
  Funktor.logger.warn(error.backtrace.join("\n")) unless error.backtrace.nil?
end