Exception: Hatchet::TaskRunError

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

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

  • task_run_external_id: (String, nil) (defaults to: nil)


65
66
67
68
69
# File 'lib/hatchet/exceptions.rb', line 65

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



61
62
63
# File 'lib/hatchet/exceptions.rb', line 61

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



58
59
60
# File 'lib/hatchet/exceptions.rb', line 58

def task_run_external_id
  @task_run_external_id
end