org.libvirt
Class Error

java.lang.Object
  extended by org.libvirt.Error
All Implemented Interfaces:
java.io.Serializable

public class Error
extends java.lang.Object
implements java.io.Serializable

An error which is returned from libvirt,

See Also:
Serialized Form

Nested Class Summary
static class Error.ErrorDomain
           
static class Error.ErrorLevel
           
static class Error.ErrorNumber
           
 
Constructor Summary
Error()
           
Error(virError vError)
           
 
Method Summary
 Error.ErrorNumber getCode()
          Gets he error code
 Connect getConn()
          Deprecated.  
 Domain getDom()
          Deprecated.  
 Error.ErrorDomain getDomain()
          Tells What part of the library raised this error
 int getInt1()
           
 int getInt2()
           
 Error.ErrorLevel getLevel()
          Tells how consequent is the error
 java.lang.String getMessage()
          Returns human-readable informative error messag
 Network getNet()
          Deprecated.  
 java.lang.String getStr1()
           
 java.lang.String getStr2()
           
 java.lang.String getStr3()
           
 boolean hasConn()
          Does this error has a valid Connection object attached? NOTE: deprecated, should return false
 boolean hasDom()
          Does this error has a valid Domain object attached? NOTE: deprecated, should return false
 boolean hasNet()
          Does this error has a valid Network object attached? NOTE: deprecated, should return false
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Error

public Error()

Error

public Error(virError vError)
Method Detail

getCode

public Error.ErrorNumber getCode()
Gets he error code

Returns:
a VirErroNumber

getConn

@Deprecated
public Connect getConn()
                throws ErrorException
Deprecated. 

returns the Connection associated with the error, if available Deprecated, always throw an exception now

Returns:
the Connect object
Throws:
ErrorException

getDom

@Deprecated
public Domain getDom()
              throws ErrorException
Deprecated. 

returns the Domain associated with the error, if available

Returns:
Domain object
Throws:
ErrorException

getDomain

public Error.ErrorDomain getDomain()
Tells What part of the library raised this error

Returns:
a ErrorDomain

getInt1

public int getInt1()
Returns:
extra number information

getInt2

public int getInt2()
Returns:
extra number information

getLevel

public Error.ErrorLevel getLevel()
Tells how consequent is the error

Returns:
a ErrorLevel

getMessage

public java.lang.String getMessage()
Returns human-readable informative error messag

Returns:
error message

getNet

@Deprecated
public Network getNet()
               throws ErrorException
Deprecated. 

Returns the network associated with the error, if available

Returns:
Network object
Throws:
ErrorException

getStr1

public java.lang.String getStr1()
Returns:
extra string information

getStr2

public java.lang.String getStr2()
Returns:
extra string information

getStr3

public java.lang.String getStr3()
Returns:
extra string information

hasConn

public boolean hasConn()
Does this error has a valid Connection object attached? NOTE: deprecated, should return false

Returns:
false

hasDom

public boolean hasDom()
Does this error has a valid Domain object attached? NOTE: deprecated, should return false

Returns:
false

hasNet

public boolean hasNet()
Does this error has a valid Network object attached? NOTE: deprecated, should return false

Returns:
false

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object