Class: EventSourcery::EventProcessing::ErrorHandlers::NoRetry
- Inherits:
-
Object
- Object
- EventSourcery::EventProcessing::ErrorHandlers::NoRetry
- Includes:
- ErrorHandler
- Defined in:
- lib/event_sourcery/event_processing/error_handlers/no_retry.rb
Instance Method Summary collapse
-
#initialize(processor_name:) ⇒ NoRetry
constructor
A new instance of NoRetry.
-
#with_error_handling ⇒ Object
Will yield the block and exit the process if an error is raised.
Constructor Details
#initialize(processor_name:) ⇒ NoRetry
Returns a new instance of NoRetry.
6 7 8 |
# File 'lib/event_sourcery/event_processing/error_handlers/no_retry.rb', line 6 def initialize(processor_name:) @processor_name = processor_name end |
Instance Method Details
#with_error_handling ⇒ Object
Will yield the block and exit the process if an error is raised.
11 12 13 14 15 16 |
# File 'lib/event_sourcery/event_processing/error_handlers/no_retry.rb', line 11 def with_error_handling yield rescue => error report_error(error) Process.exit(false) end |