class Exceptions::Backends::Context

Public: Context is a middleware that will add the given context options whenever an exception is reported.

Attributes

backend[R]
extra[R]

Public Class Methods

new(backend, context = {}) click to toggle source
# File lib/exceptions/backends/context.rb, line 8
def initialize(backend, context = {})
  @backend = backend
  @extra = context
end

Public Instance Methods

clear_context(*args) click to toggle source
# File lib/exceptions/backends/context.rb, line 22
def clear_context(*args)
  backend.clear_context(*args)
end
context(*args) click to toggle source
# File lib/exceptions/backends/context.rb, line 18
def context(*args)
  backend.context(*args)
end
notify(exception, *args) click to toggle source
# File lib/exceptions/backends/context.rb, line 13
def notify(exception, *args)
  backend.context extra
  backend.notify(exception, *args)
end