OWBI1::CIMException Class Reference

#include <OWBI1_CIMException.hpp>

Inheritance diagram for OWBI1::CIMException:

Inheritance graph
[legend]
Collaboration diagram for OWBI1::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 OWBI1_CIMException.hpp.


Member Enumeration Documentation

enum OWBI1::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 OWBI1_CIMException.hpp.


Constructor & Destructor Documentation

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

Definition at line 83 of file OWBI1_CIMException.cpp.

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

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

Definition at line 90 of file OWBI1_CIMException.cpp.

References m_description.

OWBI1::CIMException::CIMException const CIMException x  ) 
 

Definition at line 98 of file OWBI1_CIMException.cpp.


Member Function Documentation

CIMException * OWBI1::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 OWBI1::Exception.

Definition at line 173 of file OWBI1_CIMException.cpp.

References CIMException().

const char * OWBI1::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 162 of file OWBI1_CIMException.cpp.

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

Referenced by OWBI1::createLongMessage().

const char * OWBI1::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 126 of file OWBI1_CIMException.cpp.

References m_description.

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

Definition at line 105 of file OWBI1_CIMException.hpp.

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

Definition at line 105 of file OWBI1_CIMException.cpp.

References CIMException().

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

Definition at line 106 of file OWBI1_CIMException.hpp.

void OWBI1::CIMException::swap CIMException x  ) 
 

Definition at line 112 of file OWBI1_CIMException.cpp.

References m_description, and OW_NAMESPACE::swap().

const char * OWBI1::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 OWBI1::Exception.

Definition at line 119 of file OWBI1_CIMException.cpp.


Member Data Documentation

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

Definition at line 126 of file OWBI1_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:18:04 2006 for openwbem by  doxygen 1.4.6