Revision b61fa2cb src/oca/ruby/opennebula/error.rb
src/oca/ruby/opennebula/error.rb | ||
---|---|---|
28 | 28 |
EACTION = 0x0800 |
29 | 29 |
EXML_RPC_API = 0x1000 |
30 | 30 |
EINTERNAL = 0x2000 |
31 |
ENOTDEFINED = 0x1111 |
|
32 |
|
|
31 |
EALLOCATE = 0x4000 |
|
32 |
ENOTDEFINED = 0xF001 |
|
33 |
EXML_RPC_CALL = 0xF002 |
|
34 |
|
|
33 | 35 |
attr_reader :message, :errno |
34 | 36 |
|
35 | 37 |
# +message+ Description of the error |
... | ... | |
42 | 44 |
def to_str() |
43 | 45 |
@message |
44 | 46 |
end |
47 |
|
|
48 |
def is_exml_rpc_call?() |
|
49 |
@errno == EXML_RPC_CALL |
|
50 |
end |
|
51 |
|
|
45 | 52 |
end |
46 | 53 |
|
47 | 54 |
# Returns true if the object returned by a method of the OpenNebula |
... | ... | |
49 | 56 |
def self.is_error?(value) |
50 | 57 |
value.class==OpenNebula::Error |
51 | 58 |
end |
59 |
|
|
52 | 60 |
end |
Also available in: Unified diff