Class: TestTrack::MisconfigurationNotifier

Inherits:
Object
  • Object
show all
Defined in:
app/models/test_track/misconfiguration_notifier.rb

Instance Method Summary collapse

Instance Method Details

#notify(msg) ⇒ Object



2
3
4
5
6
7
8
9
10
11
12
# File 'app/models/test_track/misconfiguration_notifier.rb', line 2

def notify(msg)
  raise msg if Rails.env.development?

  Rails.logger.error(msg)

  if Airbrake.respond_to?(:notify_or_ignore)
    Airbrake.notify_or_ignore(StandardError.new, error_message: msg)
  else
    Airbrake.notify(StandardError.new, error_message: msg)
  end
end