Exception: GenevaDrive::StepExecutionError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/geneva_drive/flow_control.rb

Overview

Base class for errors that occur during step execution. These errors are raised after recovery actions have been performed, so the workflow/step states are already updated when the exception propagates.

Examples:

Rescuing step execution errors

begin
  GenevaDrive::Executor.execute!(step_execution)
rescue GenevaDrive::StepExecutionError => e
  Rails.logger.error("Step failed: #{e.message}")
  Rails.logger.error("Original error: #{e.cause}")
end

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message, step_execution:, workflow:) ⇒ StepExecutionError

Creates a new StepExecutionError.

Parameters:



75
76
77
78
79
# File 'lib/geneva_drive/flow_control.rb', line 75

def initialize(message, step_execution:, workflow:)
  @step_execution = step_execution
  @workflow = workflow
  super(message)
end

Instance Attribute Details

#step_execution ⇒ GenevaDrive::StepExecution (readonly)

Returns the step execution that failed.

Returns:



65
66
67
# File 'lib/geneva_drive/flow_control.rb', line 65

def step_execution
  @step_execution
end

#workflow ⇒ GenevaDrive::Workflow (readonly)

Returns the workflow.

Returns:



68
69
70
# File 'lib/geneva_drive/flow_control.rb', line 68

def workflow
  @workflow
end