Exception: Win32::NetResources::Error
- Inherits:
-
StandardError
- Object
- StandardError
- Win32::NetResources::Error
- Defined in:
- lib/Win32/NetResources.rb
Overview
Exceptions
Instance Attribute Summary collapse
-
#errno ⇒ Object
readonly
————————————————————————————- attributesFor: “description”.
-
#error ⇒ Object
readonly
————————————————————————————- attributesFor: “description”.
-
#OLEMethod ⇒ Object
readonly
————————————————————————————- attributesFor: “description”.
-
#OLEObject ⇒ Object
readonly
————————————————————————————- attributesFor: “description”.
Instance Method Summary collapse
-
#initialize(p_e) ⇒ Error
constructor
————————————————————————————- class methodsFor: “initialization”.
-
#to_i ⇒ Object
————————————————————————————- methodsFor: “accessing”.
Constructor Details
#initialize(p_e) ⇒ Error
class methodsFor: “initialization”
28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 |
# File 'lib/Win32/NetResources.rb', line 28 def initialize(p_e) bInOLE = false @errno = 0 @error = '' p_e.to_s.each do |line| case line.chomp when /^\s*OLE error code:([0-9a-hA-H]+) in (\w+)\.(\w+)/ @errno = $1.hex @OLEObject = $2 @OLEMethod = $3 bInOLE = true when /^\s+(.*)/ then @error += $1 + "\n" if bInOLE when /^$/ then bInOLE = false end end @error = @error.chomp super("0x%X" % @errno + ": " + @error) end |
Instance Attribute Details
#errno ⇒ Object (readonly)
attributesFor: “description”
24 25 26 |
# File 'lib/Win32/NetResources.rb', line 24 def errno @errno end |
#error ⇒ Object (readonly)
attributesFor: “description”
24 25 26 |
# File 'lib/Win32/NetResources.rb', line 24 def error @error end |
#OLEMethod ⇒ Object (readonly)
attributesFor: “description”
24 25 26 |
# File 'lib/Win32/NetResources.rb', line 24 def OLEMethod @OLEMethod end |
#OLEObject ⇒ Object (readonly)
attributesFor: “description”
24 25 26 |
# File 'lib/Win32/NetResources.rb', line 24 def OLEObject @OLEObject end |
Instance Method Details
#to_i ⇒ Object
methodsFor: “accessing”
49 50 51 |
# File 'lib/Win32/NetResources.rb', line 49 def to_i return @errno end |