Class: OvirtSDK4::Error

Inherits:
Object
  • Object
show all
Defined in:
lib/ovirtsdk4/errors.rb

Overview

The base class for all errors raised by the SDK.

Instance Attribute Summary collapse

Instance Attribute Details

#codeInteger

An error code associated to the error. For HTTP related errors, this will be the HTTP response code returned by the server. For example, if retrieving of a virtual machine fails because it doesn’t exist this attribute will contain the integer value 404. Note that this may be nil if the error is not HTTP related.

Returns:

  • (Integer)

    The HTTP error code.



29
30
31
# File 'lib/ovirtsdk4/errors.rb', line 29

def code
  @code
end

#faultFault

The Fault object associated to the error.

Returns:

  • (Fault)

    The fault object associated to the error, if a fault was provided by the server, nil otherwise.



36
37
38
# File 'lib/ovirtsdk4/errors.rb', line 36

def fault
  @fault
end