Module: Whoopsie

Defined in:
lib/whoopsie.rb,
lib/whoopsie/engine.rb,
lib/whoopsie/railtie.rb,
lib/whoopsie/version.rb,
app/helpers/whoopsie/whoopsie_helper.rb,
app/controllers/whoopsie/errors_controller.rb,
app/controllers/whoopsie/application_controller.rb

Defined Under Namespace

Modules: WhoopsieHelper Classes: ApplicationController, Engine, ErrorsController, Railtie

Constant Summary collapse

VERSION =
'0.0.2'.freeze

Class Method Summary collapse

Class Method Details

.handle_exception(exception, data = {}) ⇒ Object



15
16
17
18
# File 'lib/whoopsie.rb', line 15

def handle_exception(exception, data = {})
  return ExceptionNotifier.notify_exception(exception, data) if Rails.application.config.whoopsie.enable
  fail(exception)
end

.report_and_swallowObject



9
10
11
12
13
# File 'lib/whoopsie.rb', line 9

def report_and_swallow
  yield
rescue StandardError => e
  handle_exception(e)
end