Class: Maze::BugsnagConfig::ErrorCaptureMiddleware

Inherits:
Object
  • Object
show all
Defined in:
lib/maze/bugsnag_config.rb

Instance Method Summary collapse

Constructor Details

#initialize(middleware) ⇒ ErrorCaptureMiddleware

Returns a new instance of ErrorCaptureMiddleware.



95
96
97
# File 'lib/maze/bugsnag_config.rb', line 95

def initialize(middleware)
  @middleware = middleware
end

Instance Method Details

#call(report) ⇒ Object



99
100
101
102
103
# File 'lib/maze/bugsnag_config.rb', line 99

def call(report)
  Maze::ErrorCaptor.add(report.dup)

  @middleware.call(report)
end