Exception: WinCommon::Errors::HRESULTError
- Inherits:
-
WinCommonError
- Object
- RuntimeError
- WinCommonError
- WinCommon::Errors::HRESULTError
- Defined in:
- lib/win_common/errors/hresult.rb
Instance Attribute Summary collapse
-
#code ⇒ Object
readonly
Returns the value of attribute code.
Instance Method Summary collapse
-
#initialize(hr) ⇒ HRESULTError
constructor
A new instance of HRESULTError.
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
#code ⇒ Object (readonly)
Returns the value of attribute code.
85 86 87 |
# File 'lib/win_common/errors/hresult.rb', line 85 def code @code end |