Class: OpenNebula::Error
- Inherits:
-
Object
- Object
- OpenNebula::Error
- 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
- EALLOCATE =
0x4000
- ENOTDEFINED =
0xF001
- EXML_RPC_CALL =
0xF002
Instance Attribute Summary collapse
-
#errno ⇒ Object
readonly
Returns the value of attribute errno.
-
#message ⇒ Object
readonly
Returns the value of attribute message.
Instance Method Summary collapse
-
#initialize(message = nil, errno = 0x1111) ⇒ Error
constructor
message
Description of the errorerrno
OpenNebula code error. - #is_exml_rpc_call? ⇒ Boolean
- #to_str ⇒ Object
Constructor Details
#initialize(message = nil, errno = 0x1111) ⇒ Error
message
Description of the error errno
OpenNebula code error
39 40 41 42 |
# File 'lib/opennebula/error.rb', line 39 def initialize(=nil, errno=0x1111) @message = @errno = errno end |
Instance Attribute Details
#errno ⇒ Object (readonly)
Returns the value of attribute errno.
35 36 37 |
# File 'lib/opennebula/error.rb', line 35 def errno @errno end |
#message ⇒ Object (readonly)
Returns the value of attribute message.
35 36 37 |
# File 'lib/opennebula/error.rb', line 35 def @message end |
Instance Method Details
#is_exml_rpc_call? ⇒ Boolean
48 49 50 |
# File 'lib/opennebula/error.rb', line 48 def is_exml_rpc_call?() @errno == EXML_RPC_CALL end |
#to_str ⇒ Object
44 45 46 |
# File 'lib/opennebula/error.rb', line 44 def to_str() @message end |