lib/bolt/error.rb in bolt-1.2.0 vs lib/bolt/error.rb in bolt-1.3.0

- old
+ new

@@ -48,16 +48,17 @@ end class RunFailure < Bolt::Error attr_reader :result_set - def initialize(result_set, action, object) + def initialize(result_set, action, object = nil) details = { 'action' => action, 'object' => object, 'result_set' => result_set } - message = "Plan aborted: #{action} '#{object}' failed on #{result_set.error_set.length} nodes" + object_msg = " '#{object}'" if object + message = "Plan aborted: #{action}#{object_msg} failed on #{result_set.error_set.length} nodes" super(message, 'bolt/run-failure', details) @result_set = result_set @error_code = 2 end end