Class: OpenNebula::Error

Inherits:
Object
  • Object
show all
Defined in:
lib/opennebula/error.rb

Overview

The Error Class represents a generic error in the OpenNebula library. It contains a readable representation of the error. Any function in the OpenNebula module will return an Error object in case of error.

Constant Summary collapse

ESUCCESS =
0x0000
EAUTHENTICATION =
0x0100
EAUTHORIZATION =
0x0200
ENO_EXISTS =
0x0400
EACTION =
0x0800
EXML_RPC_API =
0x1000
EINTERNAL =
0x2000
ENOTDEFINED =
0x1111

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message = nil, errno = 0x1111) ⇒ Error

message Description of the error errno OpenNebula code error



37
38
39
40
# File 'lib/opennebula/error.rb', line 37

def initialize(message=nil, errno=0x1111)
    @message = message
    @errno   = errno
end

Instance Attribute Details

#errnoObject (readonly)

Returns the value of attribute errno.



33
34
35
# File 'lib/opennebula/error.rb', line 33

def errno
  @errno
end

#messageObject (readonly)

Returns the value of attribute message.



33
34
35
# File 'lib/opennebula/error.rb', line 33

def message
  @message
end

Instance Method Details

#to_strObject



42
43
44
# File 'lib/opennebula/error.rb', line 42

def to_str()
    @message
end