#include <OWBI1_CIMException.hpp>
Inheritance diagram for OWBI1::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 OWBI1_CIMException.hpp.
|
Definition at line 47 of file OWBI1_CIMException.hpp. |
|
Definition at line 83 of file OWBI1_CIMException.cpp. Referenced by clone(), and operator=(). |
|
Definition at line 90 of file OWBI1_CIMException.cpp. References m_description. |
|
Definition at line 98 of file OWBI1_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 OWBI1::Exception. Definition at line 173 of file OWBI1_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 162 of file OWBI1_CIMException.cpp. References OWBI1::_pmsgs, METHOD_NOT_FOUND, OWBI1::MsgRec::msg, OW_ASSERT, and SUCCESS. Referenced by OWBI1::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 126 of file OWBI1_CIMException.cpp. References m_description. |
|
Definition at line 105 of file OWBI1_CIMException.hpp. |
|
Definition at line 105 of file OWBI1_CIMException.cpp. References CIMException(). |
|
Definition at line 106 of file OWBI1_CIMException.hpp. |
|
Definition at line 112 of file OWBI1_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 OWBI1::Exception. Definition at line 119 of file OWBI1_CIMException.cpp. |
|
Definition at line 126 of file OWBI1_CIMException.hpp. Referenced by getDescription(), swap(), and ~CIMException(). |