#include <OW_CIMException.hpp>
Inheritance diagram for OW_NAMESPACE::CIMException:
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) | |
CIMException & | operator= (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 CIMException * | clone () 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 |
Definition at line 44 of file OW_CIMException.hpp.
|
Definition at line 47 of file OW_CIMException.hpp. |
|
Definition at line 81 of file OW_CIMException.cpp. Referenced by clone(), and operator=(). |
|
Definition at line 88 of file OW_CIMException.cpp. References m_description. |
|
Definition at line 96 of file OW_CIMException.cpp. |
|
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(). |
|
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(). |
|
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. |
|
|
Definition at line 103 of file OW_CIMException.cpp. References CIMException(). |
|
|
Definition at line 110 of file OW_CIMException.cpp. References m_description, and OW_NAMESPACE::swap(). |
|
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. |
|
Definition at line 126 of file OW_CIMException.hpp. Referenced by getDescription(), swap(), and ~CIMException(). |