Commit 9b9fba4ecad1766d5f2c08b741e20da26780a63b

Authored by Nathan Broadbent
1 parent 5ef7ff2a
Exists in master and in 1 other branch production

If hoptoad crashes, it doesn't send any more errors. Rescuing just makes it harder to debug

lib/overrides/hoptoad_notifier/hoptoad_notifier.rb
... ... @@ -8,20 +8,16 @@ HoptoadNotifier.module_eval do
8 8 def send_notice(notice)
9 9 # Log the error internally if we are not in a development environment.
10 10 if configuration.public?
11   - begin
12   - app = App.find_or_initialize_by(:name => "Self.Errbit")
13   - if app.new?
14   - app.github_url = "https://github.com/errbit/errbit.git"
15   - app.save!
16   - end
17   - notice.send("api_key=", app.api_key)
18   - # Create notice internally.
19   - # 'to_xml ~> from_xml' provides a data bridge between hoptoad_notifier and Errbit.
20   - ::Notice.from_xml(notice.to_xml)
21   - logger.info "Internal error was logged to 'Self.Errbit' app."
22   - rescue
23   - logger.error "-- Errbit crashed while processing an internal error!" if logger
  11 + app = App.find_or_initialize_by(:name => "Self.Errbit")
  12 + if app.new?
  13 + app.github_url = "https://github.com/errbit/errbit.git"
  14 + app.save!
24 15 end
  16 + notice.send("api_key=", app.api_key)
  17 + # Create notice internally.
  18 + # 'to_xml ~> from_xml' provides a data bridge between hoptoad_notifier and Errbit.
  19 + ::Notice.from_xml(notice.to_xml)
  20 + logger.info "Internal error was logged to 'Self.Errbit' app."
25 21 end
26 22 end
27 23 end
... ...