Module: Beaker::Shared::ErrorHandler

Included in:
Beaker::Shared
Defined in:
lib/beaker/shared/error_handler.rb

Instance Method Summary collapse

Instance Method Details

#report_and_raise(logger, e, msg) ⇒ Object



4
5
6
7
8
9
10
11
12
# File 'lib/beaker/shared/error_handler.rb', line 4

def report_and_raise(logger, e, msg)
  logger.error "Failed: errored in #{msg}"
  logger.error(e.inspect)
  bt = e.backtrace
  logger.pretty_backtrace(bt).each_line do |line|
    logger.error(line)
  end
  raise e
end