Module: MtkFramework::ActiveInteractionConcerns::Rescuable

Extended by:
ActiveSupport::Concern
Includes:
ActiveSupport::Rescuable
Included in:
Interruptable
Defined in:
lib/mtk_framework/active_interaction_concerns/rescuable.rb

Instance Method Summary collapse

Instance Method Details

#handle_rescue(*args) ⇒ Object



15
16
17
18
19
20
21
22
23
24
# File 'lib/mtk_framework/active_interaction_concerns/rescuable.rb', line 15

def handle_rescue(*args)
  yield(*args)
rescue StandardError => e
  raise unless rescue_with_handler(e)

  if errors.any?
    @_interaction_valid = false
    errors.backtrace = e.backtrace
  end
end