Exception: Puppet::Util::Windows::Error

Inherits:
Error
  • Object
show all
Includes:
Windows::Error
Defined in:
lib/puppet/util/windows/error.rb

Overview

represents an error resulting from a Win32 error code

Instance Attribute Summary collapse

Attributes inherited from Error

#original

Instance Method Summary collapse

Constructor Details

#initialize(message, code = GetLastError.call, original = nil) ⇒ Error

Returns a new instance of Error.



10
11
12
13
14
# File 'lib/puppet/util/windows/error.rb', line 10

def initialize(message, code = GetLastError.call, original = nil)
  super(message + ":  #{get_last_error(code)}", original)

  @code = code
end

Instance Attribute Details

#codeObject (readonly)



8
9
10
# File 'lib/puppet/util/windows/error.rb', line 8

def code
  @code
end