Exception: Win32::Registry::Error
- Inherits:
-
StandardError
- Object
- StandardError
- Win32::Registry::Error
- Defined in:
- lib/win32/registry.rb
Overview
Error
Constant Summary collapse
Instance Attribute Summary collapse
-
#code ⇒ Object
readonly
Returns the value of attribute code.
Instance Method Summary collapse
-
#initialize(code) ⇒ Error
constructor
A new instance of Error.
Constructor Details
#initialize(code) ⇒ Error
Returns a new instance of Error.
338 339 340 341 342 343 |
# File 'lib/win32/registry.rb', line 338 def initialize(code) @code = code msg = "\0" * 1024 len = FormatMessageA.call(0x1200, 0, code, 0, msg, 1024, 0) super msg[0, len].tr("\r", '').chomp end |
Instance Attribute Details
#code ⇒ Object (readonly)
Returns the value of attribute code
344 345 346 |
# File 'lib/win32/registry.rb', line 344 def code @code end |