Exception: Bolt::RunFailure
Direct Known Subclasses
Instance Attribute Summary collapse
-
#result_set ⇒ Object
readonly
Returns the value of attribute result_set.
Attributes inherited from Error
#details, #error_code, #issue_code, #kind
Instance Method Summary collapse
-
#initialize(result_set, action, object = nil) ⇒ RunFailure
constructor
A new instance of RunFailure.
Methods inherited from Error
#add_filelineno, #msg, #to_h, #to_json, #to_puppet_error, unknown_plan, unknown_task
Constructor Details
#initialize(result_set, action, object = nil) ⇒ RunFailure
Returns a new instance of RunFailure.
82 83 84 85 86 87 88 89 90 91 92 93 94 |
# File 'lib/bolt/error.rb', line 82 def initialize(result_set, action, object = nil) details = { 'action' => action, 'object' => object, 'result_set' => result_set } object_msg = " '#{object}'" if object = "#{action}#{object_msg} failed on #{result_set.error_set.length} target" += "s" unless result_set.error_set.length == 1 super(, 'bolt/run-failure', details) @result_set = result_set @error_code = 2 end |
Instance Attribute Details
#result_set ⇒ Object (readonly)
Returns the value of attribute result_set.
80 81 82 |
# File 'lib/bolt/error.rb', line 80 def result_set @result_set end |