OW_NAMESPACE::CIMException Class Reference

#include <OW_CIMException.hpp>

Inheritance diagram for OW_NAMESPACE::CIMException:

Inheritance graph
[legend]
Collaboration diagram for OW_NAMESPACE::CIMException:

Collaboration graph
[legend]
List of all members.

Public Types

enum  ErrNoType {
  SUCCESS = 0, FAILED = 1, ACCESS_DENIED = 2, INVALID_NAMESPACE = 3,
  INVALID_PARAMETER = 4, INVALID_CLASS = 5, NOT_FOUND = 6, NOT_SUPPORTED = 7,
  CLASS_HAS_CHILDREN = 8, CLASS_HAS_INSTANCES = 9, INVALID_SUPERCLASS = 10, ALREADY_EXISTS = 11,
  NO_SUCH_PROPERTY = 12, TYPE_MISMATCH = 13, QUERY_LANGUAGE_NOT_SUPPORTED = 14, INVALID_QUERY = 15,
  METHOD_NOT_AVAILABLE = 16, METHOD_NOT_FOUND = 17
}

Public Member Functions

 CIMException (const char *file, int line, ErrNoType errval, const char *msg=0, const Exception *otherException=0)
virtual ~CIMException () throw ()
void swap (CIMException &x)
 CIMException (const CIMException &x)
CIMExceptionoperator= (const CIMException &x)
ErrNoType getErrNo () const
void setErrNo (ErrNoType e)
const char * getDescription () const
 A CIMException consists of a code (ErrNoType), and an optional message for further clarification.
virtual const char * type () const
 Returns a string representing the concrete type.
virtual CIMExceptionclone () const throw ()
 Make a copy of this exception object.

Static Public Member Functions

static const char * getCodeDescription (ErrNoType errCode)
 Get a static string description of errCode.

Private Attributes

const char * m_description

Detailed Description

Definition at line 44 of file OW_CIMException.hpp.


Member Enumeration Documentation

enum OW_NAMESPACE::CIMException::ErrNoType
 

Enumerator:
SUCCESS  No error.
FAILED  A general error occured that is not covered by a more specific error code.
ACCESS_DENIED  Access to a CIM resource was not available to the client.
INVALID_NAMESPACE  The target namespace does not exist.
INVALID_PARAMETER  One or more parameter values passed to the method were invalid.
INVALID_CLASS  The specified Class does not exist.
NOT_FOUND  The requested object could not be found.
NOT_SUPPORTED  The requested operation is not supported.
CLASS_HAS_CHILDREN  Operation cannot be carried out on this class since it has subclasses.
CLASS_HAS_INSTANCES  Operation cannot be carried out on this class since it has instances.
INVALID_SUPERCLASS  Operation cannot be carried out since the specified superclass does not exist.
ALREADY_EXISTS  Operation cannot be carried out because an object already exists.
NO_SUCH_PROPERTY  The specified Property does not exist.
TYPE_MISMATCH  The value supplied is incompatible with the type.
QUERY_LANGUAGE_NOT_SUPPORTED  The query language is not recognized or supported.
INVALID_QUERY  The query is not valid for the specified query language.
METHOD_NOT_AVAILABLE  The extrinsic Method could not be executed.
METHOD_NOT_FOUND  The specified extrinsic Method does not exist.

Definition at line 47 of file OW_CIMException.hpp.


Constructor & Destructor Documentation

OW_NAMESPACE::CIMException::CIMException const char *  file,
int  line,
ErrNoType  errval,
const char *  msg = 0,
const Exception otherException = 0
 

Definition at line 81 of file OW_CIMException.cpp.

Referenced by clone(), and operator=().

OW_NAMESPACE::CIMException::~CIMException  )  throw () [virtual]
 

Definition at line 88 of file OW_CIMException.cpp.

References m_description.

OW_NAMESPACE::CIMException::CIMException const CIMException x  ) 
 

Definition at line 96 of file OW_CIMException.cpp.


Member Function Documentation

CIMException * OW_NAMESPACE::CIMException::clone  )  const throw () [virtual]
 

Make a copy of this exception object.

If allocation fails, return 0. Subclasses need to override this function. This function must not throw. Here is an example of how to implement this in a derived class:

virtual DerivedException* clone() const { return new(std::nothrow) DerivedException(*this); }

Reimplemented from OW_NAMESPACE::Exception.

Definition at line 171 of file OW_CIMException.cpp.

References CIMException().

const char * OW_NAMESPACE::CIMException::getCodeDescription ErrNoType  errCode  )  [static]
 

Get a static string description of errCode.

This function is thread safe. Each description is stored in a separate buffer. Caller must not free or modify the result. If errCode is invalid a pointer to "unknown error" will be returned.

Definition at line 160 of file OW_CIMException.cpp.

References OW_NAMESPACE::_pmsgs, METHOD_NOT_FOUND, OW_NAMESPACE::MsgRec::msg, OW_ASSERT, and SUCCESS.

Referenced by OW_NAMESPACE::createLongMessage().

const char * OW_NAMESPACE::CIMException::getDescription  )  const
 

A CIMException consists of a code (ErrNoType), and an optional message for further clarification.

getMessage() returns the textual representation of the code (as returned by getCodeDescription) followed by the optional message in parenthesis. This function returns just the optional message, as passed to the constructor. If not available, 0 will be returned.

Definition at line 124 of file OW_CIMException.cpp.

References m_description.

ErrNoType OW_NAMESPACE::CIMException::getErrNo  )  const [inline]
 

Definition at line 105 of file OW_CIMException.hpp.

Referenced by OW_NAMESPACE::CIMServer::_instGetClass(), OW_NAMESPACE::RemoteAssociatorProvider::associatorNames(), OW_NAMESPACE::RemoteAssociatorProvider::associators(), OW_NAMESPACE::MOF::CIMOMVisitor::CIMOMgetClass(), OW_NAMESPACE::MOF::CIMOMVisitor::CIMOMgetQualifierType(), OW_NAMESPACE::MOF::CIMOMVisitor::CIMOMprocessClass(), OW_NAMESPACE::MOF::CIMOMVisitor::CIMOMprocessClassAux(), OW_NAMESPACE::MOF::CIMOMVisitor::CIMOMprocessInstance(), OW_NAMESPACE::MOF::CIMOMVisitor::CIMOMprocessInstanceAux(), OW_NAMESPACE::MOF::CIMOMVisitor::CIMOMprocessQualifierType(), OW_NAMESPACE::CIMRepository::createClass(), OW_NAMESPACE::RemoteInstanceProvider::createInstance(), OW_NAMESPACE::RemoteInstanceProvider::deleteInstance(), OW_NAMESPACE::RemoteInstanceProvider::enumInstanceNames(), OW_NAMESPACE::RemoteInstanceProvider::enumInstances(), OW_NAMESPACE::CIMServer::execQuery(), OW_NAMESPACE::RemoteInstanceProvider::getInstance(), OW_NAMESPACE::OpenWBEM_ObjectManagerInstProv::initialize(), OW_NAMESPACE::RemoteMethodProvider::invokeMethod(), OW_NAMESPACE::RemoteInstanceProvider::modifyInstance(), OW_NAMESPACE::RemoteAssociatorProvider::referenceNames(), OW_NAMESPACE::RemoteAssociatorProvider::references(), OW_NAMESPACE::HTTPXMLCIMListenerCallback::registerForIndication(), OW_NAMESPACE::CIMServer::setProperty(), OW_NAMESPACE::CIMRepository2::setProperty(), and OW_NAMESPACE::CIMRepository::setProperty().

CIMException & OW_NAMESPACE::CIMException::operator= const CIMException x  ) 
 

Definition at line 103 of file OW_CIMException.cpp.

References CIMException().

void OW_NAMESPACE::CIMException::setErrNo ErrNoType  e  )  [inline]
 

Definition at line 106 of file OW_CIMException.hpp.

Referenced by OW_NAMESPACE::CIMServer::_instGetClass(), OW_NAMESPACE::RemoteAssociatorProvider::associatorNames(), OW_NAMESPACE::RemoteAssociatorProvider::associators(), OW_NAMESPACE::RemoteInstanceProvider::createInstance(), OW_NAMESPACE::RemoteInstanceProvider::deleteInstance(), OW_NAMESPACE::RemoteInstanceProvider::enumInstanceNames(), OW_NAMESPACE::RemoteInstanceProvider::enumInstances(), OW_NAMESPACE::RemoteInstanceProvider::getInstance(), OW_NAMESPACE::RemoteMethodProvider::invokeMethod(), OW_NAMESPACE::RemoteInstanceProvider::modifyInstance(), OW_NAMESPACE::RemoteAssociatorProvider::referenceNames(), OW_NAMESPACE::RemoteAssociatorProvider::references(), OW_NAMESPACE::CIMServer::setProperty(), OW_NAMESPACE::CIMRepository2::setProperty(), and OW_NAMESPACE::CIMRepository::setProperty().

void OW_NAMESPACE::CIMException::swap CIMException x  ) 
 

Definition at line 110 of file OW_CIMException.cpp.

References m_description, and OW_NAMESPACE::swap().

const char * OW_NAMESPACE::CIMException::type  )  const [virtual]
 

Returns a string representing the concrete type.

e.g. "SocketException". Will not return 0. This function will not throw. Derived class implementations must not throw.

Reimplemented from OW_NAMESPACE::Exception.

Definition at line 117 of file OW_CIMException.cpp.


Member Data Documentation

const char* OW_NAMESPACE::CIMException::m_description [private]
 

Definition at line 126 of file OW_CIMException.hpp.

Referenced by getDescription(), swap(), and ~CIMException().


The documentation for this class was generated from the following files:
Generated on Thu Feb 9 09:12:26 2006 for openwbem by  doxygen 1.4.6