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.



106
107
108
109
# File 'lib/win_common/errors/hresult.rb', line 106

def initialize(hr)
    @code = HRESULT.toUnsigned(hr)
    super(HRESULT.GetNameCode(@code))
end

Instance Attribute Details

#codeObject (readonly)

Returns the value of attribute code.



105
106
107
# File 'lib/win_common/errors/hresult.rb', line 105

def code
  @code
end