Module: Honeybadger
- Defined in:
- lib/honeybadger-local-context.rb
Class Method Summary collapse
- .notify_with_context(exception, options = {}) ⇒ Object (also: notify)
Class Method Details
.notify_with_context(exception, options = {}) ⇒ Object Also known as: notify
6 7 8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/honeybadger-local-context.rb', line 6 def notify_with_context(exception, = {}) ctx = binding.of_caller(1) vars = eval('local_variables', ctx) locals_array = vars.map { |arg| [arg, eval(arg.to_s, ctx)]} [:context] ||= {} [:context][:local_variables] = Hash[*locals_array.flatten(1)] puts "Notify called with options: #{}" return notify_without_context(exception, ) end |