Exception: Bolt::ParallelFailure

Inherits:
Error
  • Object
show all
Defined in:
lib/bolt/error.rb

Instance Attribute Summary

Attributes inherited from Error

#details, #error_code, #issue_code, #kind

Instance Method Summary collapse

Methods inherited from Error

#add_filelineno, #msg, #to_h, #to_json, #to_puppet_error, unknown_plan, unknown_task

Constructor Details

#initialize(results, failed_indices) ⇒ ParallelFailure

Returns a new instance of ParallelFailure.



109
110
111
112
113
114
115
116
117
118
119
# File 'lib/bolt/error.rb', line 109

def initialize(results, failed_indices)
  details = {
    'action' => 'parallelize',
    'failed_indices' => failed_indices,
    'results' => results
  }
  message = "Plan aborted: parallel block failed on #{failed_indices.length} target"
  message += "s" unless failed_indices.length == 1
  super(message, 'bolt/parallel-failure', details)
  @error_code = 2
end