Exception: Bolt::PuppetError

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

Instance Attribute Summary

Attributes inherited from Error

#details, #error_code, #issue_code, #kind

Class Method Summary collapse

Methods inherited from Error

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

Constructor Details

This class inherits a constructor from Bolt::Error

Class Method Details

.convert_puppet_errors(result) ⇒ Object



68
69
70
# File 'lib/bolt/error.rb', line 68

def self.convert_puppet_errors(result)
  Bolt::Util.walk_vals(result) { |v| v.is_a?(Puppet::DataTypes::Error) ? from_error(v) : v }
end

.from_error(err) ⇒ Object



72
73
74
# File 'lib/bolt/error.rb', line 72

def self.from_error(err)
  new(err.msg, err.kind, err.details, err.issue_code)
end