javax.wbem

Class WBEMException

public class WBEMException extends Exception implements Serializable

WBEMException is what all WBEM Operations return when there is an error. WBEMException includes the following:
Field Summary
static intCIM_ERR_ACCESS_DENIED
Access Denied Exception.
static intCIM_ERR_ALREADY_EXISTS
Element already exists.
static intCIM_ERR_CLASS_HAS_CHILDREN
Class has subclasses.
static intCIM_ERR_CLASS_HAS_INSTANCES
Class has instances.
static intCIM_ERR_FAILED
General Exception.
static intCIM_ERR_INVALID_CLASS
Invalid class specified.
static intCIM_ERR_INVALID_NAMESPACE
Invalid namespace Exception Thrown whem the specified namespace does not exist.
static intCIM_ERR_INVALID_PARAMETER
Invalid parameter is passed to a method.
static intCIM_ERR_INVALID_QUERY
Invalid query.
static intCIM_ERR_INVALID_RESPONSE_DESTINATION
The destination is invalid.
static intCIM_ERR_INVALID_SUPERCLASS
The super class does not exist.
static intCIM_ERR_METHOD_NOT_AVAILABLE
The method is not available.
static intCIM_ERR_METHOD_NOT_FOUND
The method is not found.
static intCIM_ERR_NAMESPACE_NOT_EMPTY
The namespace is not empty.
static intCIM_ERR_NOT_FOUND
Element cannot be found.
static intCIM_ERR_NOT_SUPPORTED
The action is not supported.
static intCIM_ERR_NO_SUCH_PROPERTY
The property does not exist in the class/instance being manipulated.
static intCIM_ERR_QUERY_LANGUAGE_NOT_SUPPORTED
The requested query language is not recognized.
static intCIM_ERR_TYPE_MISMATCH
The value supplied is not compatible with the type.
Constructor Summary
WBEMException(int pID)
Constructs a new exception using the specified ID.
WBEMException(int pID, String pMessage)
Constructs a new exception using the specified ID and detailed message.
WBEMException(int pID, String pMessage, CIMInstance[] pErrors)
Constructs a new exception using the specified ID, detailed message and CIM_Error instances.
WBEMException(int pID, String pMessage, CIMInstance[] pErrors, Throwable pCause)
Constructs a new exception using the specified ID, detailed message, CIM_Error instances and cause.
WBEMException(String pMessage)
Construces a new exception using the specified detailed message.
Method Summary
CIMInstance[]getCIMErrors()
Get the CIM Error Instances.
intgetID()
Returns the ID of the error
StringgetMessage()
StringtoString()
Prints out the ID and the optional detailed message.

Field Detail

CIM_ERR_ACCESS_DENIED

public static final int CIM_ERR_ACCESS_DENIED
Access Denied Exception. Thrown when the principal is not authenticated or authorized.

CIM_ERR_ALREADY_EXISTS

public static final int CIM_ERR_ALREADY_EXISTS
Element already exists.

CIM_ERR_CLASS_HAS_CHILDREN

public static final int CIM_ERR_CLASS_HAS_CHILDREN
Class has subclasses. The exception is thrown by the WBEM Server to disallow invalidation of the subclasses by the super class deletion. Clients must explicitly delete the subclasses first. The check for subclasses is made before the check for class instances.

CIM_ERR_CLASS_HAS_INSTANCES

public static final int CIM_ERR_CLASS_HAS_INSTANCES
Class has instances. The exception is thrown by to disallow invalidation of the instances by the class deletion. Clients must explicitly delete the instances first. The check for subclasses is made before the check for class instances i.e. CIM_ERR_CLASS_HAS_CHILDREN is thrown before CIM_ERR_CLASS_HAS_INSTANCES

CIM_ERR_FAILED

public static final int CIM_ERR_FAILED
General Exception. If no other error IDs match the error, this one should be returned.

CIM_ERR_INVALID_CLASS

public static final int CIM_ERR_INVALID_CLASS
Invalid class specified. For e.g. when one tries to add an instance for a class that does not exist. This error message uses one parameter, the invalid class name.

CIM_ERR_INVALID_NAMESPACE

public static final int CIM_ERR_INVALID_NAMESPACE
Invalid namespace Exception Thrown whem the specified namespace does not exist.

CIM_ERR_INVALID_PARAMETER

public static final int CIM_ERR_INVALID_PARAMETER
Invalid parameter is passed to a method. This error message uses one parameter, the parameter which caused the exception.

CIM_ERR_INVALID_QUERY

public static final int CIM_ERR_INVALID_QUERY
Invalid query. This error message uses has two parameters, the invalid snippet of the query, and additional info with the actual error in the query.

CIM_ERR_INVALID_RESPONSE_DESTINATION

public static final int CIM_ERR_INVALID_RESPONSE_DESTINATION
The destination is invalid.

CIM_ERR_INVALID_SUPERCLASS

public static final int CIM_ERR_INVALID_SUPERCLASS
The super class does not exist.

CIM_ERR_METHOD_NOT_AVAILABLE

public static final int CIM_ERR_METHOD_NOT_AVAILABLE
The method is not available.

CIM_ERR_METHOD_NOT_FOUND

public static final int CIM_ERR_METHOD_NOT_FOUND
The method is not found.

CIM_ERR_NAMESPACE_NOT_EMPTY

public static final int CIM_ERR_NAMESPACE_NOT_EMPTY
The namespace is not empty.

CIM_ERR_NOT_FOUND

public static final int CIM_ERR_NOT_FOUND
Element cannot be found. This error message uses one parameter, the element that cannot be found.

CIM_ERR_NOT_SUPPORTED

public static final int CIM_ERR_NOT_SUPPORTED
The action is not supported. This can be thrown by a provider or the WBEM Server itself when it does not support a particular method.

CIM_ERR_NO_SUCH_PROPERTY

public static final int CIM_ERR_NO_SUCH_PROPERTY
The property does not exist in the class/instance being manipulated. This error message uses has one parameter, the name of the property that does not exist.

CIM_ERR_QUERY_LANGUAGE_NOT_SUPPORTED

public static final int CIM_ERR_QUERY_LANGUAGE_NOT_SUPPORTED
The requested query language is not recognized. This error message has one parameter, the invalid query language string.

CIM_ERR_TYPE_MISMATCH

public static final int CIM_ERR_TYPE_MISMATCH
The value supplied is not compatible with the type.

Constructor Detail

WBEMException

public WBEMException(int pID)
Constructs a new exception using the specified ID. The detailed message will be null.

Parameters: pID - The Error ID to use.

WBEMException

public WBEMException(int pID, String pMessage)
Constructs a new exception using the specified ID and detailed message.

Parameters: pID - The error ID. pMessage - The detailed message.

WBEMException

public WBEMException(int pID, String pMessage, CIMInstance[] pErrors)
Constructs a new exception using the specified ID, detailed message and CIM_Error instances.

Parameters: pID - The error ID pMessage - The detailed message. pErrors - Array of CIM_Error instances.

WBEMException

public WBEMException(int pID, String pMessage, CIMInstance[] pErrors, Throwable pCause)
Constructs a new exception using the specified ID, detailed message, CIM_Error instances and cause.

Parameters: pID - The error ID. pMessage - The detailed message. pErrors - Array of CIM_Error instances. pCause - Throwable cause.

WBEMException

public WBEMException(String pMessage)
Construces a new exception using the specified detailed message. The ID will be CIM_ERR_FAILED.

Parameters: pMessage - The detailed message.

Method Detail

getCIMErrors

public CIMInstance[] getCIMErrors()
Get the CIM Error Instances.

Returns: Any CIM Error instances associated with this exception; null if none.

getID

public int getID()
Returns the ID of the error

Returns: The ID of the error

getMessage

public String getMessage()

toString

public String toString()
Prints out the ID and the optional detailed message.

Returns: A String representation of the exception.

See Also: java.lang.Object#toString()

Copyright © 2005, 2009 IBM Corporation. All Rights Reserved.