Exception: WinCommon::Errors::HRESULTError

Inherits:
WinCommonError show all
Defined in:
lib/win_common/errors/hresult.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(hr) ⇒ HRESULTError

Returns a new instance of HRESULTError.



86
87
88
89
# File 'lib/win_common/errors/hresult.rb', line 86

def initialize(hr)
    @code = HRESULT.toUnsigned(hr)
    super(HRESULT.GetName(@code) + " [0x%08X]" % @code)
end

Instance Attribute Details

#codeObject (readonly)

Returns the value of attribute code.



85
86
87
# File 'lib/win_common/errors/hresult.rb', line 85

def code
  @code
end