handle_failure.rb 340 B

1234567891011121314
  1. # Copyright (C) 2012-2024 Zammad Foundation, https://zammad-foundation.org/
  2. module Sequencer::Unit::Import::Common::Model::Mixin::HandleFailure
  3. def self.included(base)
  4. base.provides :exception, :action
  5. end
  6. def handle_failure(e)
  7. logger.error(e)
  8. state.provide(:exception, e)
  9. state.provide(:action, :failed)
  10. end
  11. end