Exception: Hatchet::TaskRunError

Inherits:
Error
  • Object
show all
Defined in:
lib/hatchet/exceptions.rb

Overview

Represents an error from a failed task run

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message, task_run_external_id: nil) ⇒ TaskRunError

Returns a new instance of TaskRunError.

Parameters:

  • message (String)

    Error message

  • task_run_external_id (String) (defaults to: nil)

    The external ID of the failed task run



37
38
39
40
41
# File 'lib/hatchet/exceptions.rb', line 37

def initialize(message, task_run_external_id: nil)
  @task_run_external_id = task_run_external_id
  @exc = message
  super(message)
end

Instance Attribute Details

#excString (readonly)

Returns The error message from the task.

Returns:

  • (String)

    The error message from the task



33
34
35
# File 'lib/hatchet/exceptions.rb', line 33

def exc
  @exc
end

#task_run_external_idString (readonly)

Returns The external ID of the failed task run.

Returns:

  • (String)

    The external ID of the failed task run



30
31
32
# File 'lib/hatchet/exceptions.rb', line 30

def task_run_external_id
  @task_run_external_id
end