public enum ErrorCode extends Enum<ErrorCode>
try { ... ... } catch (VBoxException vboxException) { RuntimeFaultMsg fault = (RuntimeFaultMsg) vboxException.getWrapped(); int faultCode = fault.getFaultInfo().getResultCode(); ErrorCode errorCode = ErrorCode.valueOf(faultCode); }
Modifier and Type | Method and Description |
---|---|
static ErrorCode |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static ErrorCode |
valueOf(org.virtualbox_4_1.VBoxException vboxException)
Returns an ErrorCode from the fault code given by the VirtualBox API.
|
static ErrorCode[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final ErrorCode VBOX_E_OBJECT_NOT_FOUND
public static final ErrorCode VBOX_E_INVALID_VM_STATE
public static final ErrorCode VBOX_E_VM_ERROR
public static final ErrorCode VBOX_E_FILE_ERROR
public static final ErrorCode VBOX_E_IPRT_ERROR
public static final ErrorCode VBOX_E_PDM_ERROR
public static final ErrorCode VBOX_E_INVALID_OBJECT_STATE
public static final ErrorCode VBOX_E_HOST_ERROR
public static final ErrorCode VBOX_E_NOT_SUPPORTED
public static final ErrorCode VBOX_E_XML_ERROR
public static final ErrorCode VBOX_E_INVALID_SESSION_STATE
public static final ErrorCode VBOX_E_OBJECT_IN_USE
public static final ErrorCode VBOX_E_ACCESSDENIED
public static final ErrorCode VBOX_E_POINTER
public static final ErrorCode VBOX_E_FAIL
public static final ErrorCode VBOX_E_NOTIMPL
public static final ErrorCode VBOX_E_OUTOFMEMORY
public static final ErrorCode VBOX_E_INVALIDARG
public static final ErrorCode VBOX_E_UNEXPECTED
public static final ErrorCode VBOX_E_UNKNOWN_ERROR_CODE
public static final ErrorCode VBOX_E_ERROR_CODE_UNAVAILABLE
public static ErrorCode[] values()
for (ErrorCode c : ErrorCode.values()) System.out.println(c);
public static ErrorCode valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant
with the specified nameNullPointerException
- if the argument is nullpublic static ErrorCode valueOf(org.virtualbox_4_1.VBoxException vboxException)
vboxException
- the exception to get the error code from.Copyright © 2009-2013 jclouds. All Rights Reserved.