Class: Rollbar::CronoTrigger

Inherits:
Object
  • Object
show all
Defined in:
lib/crono_trigger/rollbar.rb

Class Method Summary collapse

Class Method Details

.handle_exception(ex, record = nil) ⇒ Object



5
6
7
8
9
10
11
12
13
14
15
# File 'lib/crono_trigger/rollbar.rb', line 5

def self.handle_exception(ex, record = nil)
  scope = {
    framework: "CronoTrigger: #{::CronoTrigger::VERSION}",
  }

  if record
    scope.merge!({context: "#{record.class}/#{record.id}"})
  end

  Rollbar.scope(scope).error(ex, use_exception_level_filters: true)
end