Exception: DurableFlow::ChildWorkflowFailedError

Inherits:
Error
  • Object
show all
Defined in:
lib/durable_flow/errors.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(run_id:, workflow_class:, error_class: nil, error_message: nil) ⇒ ChildWorkflowFailedError

Returns a new instance of ChildWorkflowFailedError.



11
12
13
14
15
16
17
18
19
20
21
22
23
# File 'lib/durable_flow/errors.rb', line 11

def initialize(run_id:, workflow_class:, error_class: nil, error_message: nil)
  @run_id = run_id
  @workflow_class = workflow_class
  @error_class = error_class
  @error_message = error_message

  details = [ workflow_class, run_id ].compact.join(" ")
  message = "Child workflow #{details} failed"
  message = "#{message}: #{error_class}" if error_class.present?
  message = "#{message} - #{error_message}" if error_message.present?

  super(message)
end

Instance Attribute Details

#error_classObject (readonly)

Returns the value of attribute error_class.



9
10
11
# File 'lib/durable_flow/errors.rb', line 9

def error_class
  @error_class
end

#error_messageObject (readonly)

Returns the value of attribute error_message.



9
10
11
# File 'lib/durable_flow/errors.rb', line 9

def error_message
  @error_message
end

#run_idObject (readonly)

Returns the value of attribute run_id.



9
10
11
# File 'lib/durable_flow/errors.rb', line 9

def run_id
  @run_id
end

#workflow_classObject (readonly)

Returns the value of attribute workflow_class.



9
10
11
# File 'lib/durable_flow/errors.rb', line 9

def workflow_class
  @workflow_class
end