Exception: LanguageOperator::Agent::TaskExecutionError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/language_operator/agent/task_executor.rb

Overview

Custom error classes for task execution

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(task_name, message, original_error = nil) ⇒ TaskExecutionError

Returns a new instance of TaskExecutionError.



15
16
17
18
19
# File 'lib/language_operator/agent/task_executor.rb', line 15

def initialize(task_name, message, original_error = nil)
  @task_name = task_name
  @original_error = original_error
  super("Task '#{task_name}' execution failed: #{message}")
end

Instance Attribute Details

#original_errorObject (readonly)

Returns the value of attribute original_error.



13
14
15
# File 'lib/language_operator/agent/task_executor.rb', line 13

def original_error
  @original_error
end

#task_nameObject (readonly)

Returns the value of attribute task_name.



13
14
15
# File 'lib/language_operator/agent/task_executor.rb', line 13

def task_name
  @task_name
end