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:



59
60
61
62
63
# File 'lib/geneva_drive/flow_control.rb', line 59

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

Instance Attribute Details

#step_executionGenevaDrive::StepExecution (readonly)

Returns the step execution that failed.

Returns:



49
50
51
# File 'lib/geneva_drive/flow_control.rb', line 49

def step_execution
  @step_execution
end

#workflowGenevaDrive::Workflow (readonly)

Returns the workflow.

Returns:



52
53
54
# File 'lib/geneva_drive/flow_control.rb', line 52

def workflow
  @workflow
end