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

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

Overview

represents an error resulting from a Win32 error code

Instance Attribute Summary collapse

Attributes inherited from Error

#file, #line

Instance Method Summary collapse

Methods inherited from Error

#backtrace, #to_s

Constructor Details

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

Returns a new instance of Error.



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

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

  @code = code
end

Instance Attribute Details

#codeObject (readonly)

Returns the value of attribute code.



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

def code
  @code
end