class OpenNebula::Error

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.

Constants

EACTION
EALLOCATE
EAUTHENTICATION
EAUTHORIZATION
EINTERNAL
ENOTDEFINED
ENO_EXISTS
ESUCCESS
EXML_RPC_API
EXML_RPC_CALL

Attributes

errno[R]
message[R]

Public Class Methods

new(message=nil, errno=0x1111) click to toggle source

message Description of the error errno OpenNebula code error

# File lib/opennebula/error.rb, line 40
def initialize(message=nil, errno=0x1111)
    @message = message
    @errno   = errno
end

Public Instance Methods

inspect()
Alias for: to_str
is_exml_rpc_call?() click to toggle source
# File lib/opennebula/error.rb, line 51
def is_exml_rpc_call?()
    @errno == EXML_RPC_CALL
end
to_str() click to toggle source
# File lib/opennebula/error.rb, line 45
def to_str()
    @message
end
Also aliased as: inspect