#include "OWBI1_config.h"
#include "OWBI1_AutoPtr.hpp"
#include <iosfwd>
#include <exception>
#include <new>
Include dependency graph for OWBI1_Exception.hpp:
This graph shows which files directly or indirectly include this file:
Go to the source code of this file.
Namespaces | |
namespace | OWBI1 |
namespace | OWBI1::ExceptionDetail |
Classes | |
class | OWBI1::Exception |
This class is the base of all exceptions thrown by OpenWBEM code. More... | |
class | OWBI1::ExceptionDetail::FormatMsg |
struct | OWBI1::ExceptionDetail::Errno< exType > |
Defines | |
#define | OWBI1_THROW(exType, msg) throw exType(__FILE__, __LINE__, (msg)) |
Throw an exception using __FILE__ and __LINE__. | |
#define | OWBI1_THROWL(exType, line, msg) throw exType(__FILE__, (line), (msg)) |
This macro is deprecated in 3.1.0. | |
#define | OWBI1_THROW_SUBEX(exType, msg, subex) |
Throw an exception using __FILE__ and __LINE__. | |
#define | OWBI1_THROW_ERR(exType, msg, err) throw exType(__FILE__, __LINE__, (msg), (err)) |
Throw an exception using __FILE__ and __LINE__. | |
#define | OWBI1_THROW_ERRNO(exType) OWBI1_THROW_ERRNO1(exType, errno) |
Throw an exception using __FILE__, __LINE__, errno and strerror(errno). | |
#define | OWBI1_THROW_ERRNO1(exType, errnum) throw ExceptionDetail::Errno< exType >::simple(__FILE__, __LINE__, (errnum)) |
Throw an exception using __FILE__, __LINE__, errnum and strerror(errnum). | |
#define | OWBI1_THROW_ERRNO_MSG(exType, msg) OWBI1_THROW_ERRNO_MSG1(exType, (msg), errno) |
Throw an exception using __FILE__, __LINE__, errno and strerror(errno). | |
#define | OWBI1_THROW_ERRNO_MSG1(exType, msg, errnum) |
Throw an exception using __FILE__, __LINE__, errnum and strerror(errnum). | |
#define | OWBI1_THROW_ERR_SUBEX(exType, msg, err, subex) throw exType(__FILE__, __LINE__, (msg), (err), &(subex)) |
Throw an exception using __FILE__ and __LINE__. | |
#define | OWBI1_DECLARE_EXCEPTION2(NAME, BASE) |
Declare a new exception class named <NAME>Exception that derives from <BASE>. | |
#define | OWBI1_DECLARE_APIEXCEPTION2(NAME, BASE, LINKAGE_SPEC) |
Declare a new exception class named <NAME>Exception that derives from <BASE>. | |
#define | OWBI1_DECLARE_EXCEPTION(NAME) OWBI1_DECLARE_EXCEPTION2(NAME, ::OWBI1::Exception) |
Declare a new exception class named <NAME>Exception that derives from Exception This macro is typically used in a header file. | |
#define | OWBI1_DECLARE_APIEXCEPTION(NAME, LINKAGE_SPEC) OWBI1_DECLARE_APIEXCEPTION2(NAME, ::OWBI1::Exception, LINKAGE_SPEC) |
Declare a new exception class named <NAME>Exception that derives from Exception This macro is typically used in a header file. | |
#define | OWBI1_DEFINE_EXCEPTION2(NAME, BASE) |
Define a new exception class named <NAME>Exception that derives from <BASE>. | |
#define | OWBI1_DEFINE_EXCEPTION_WITH_BASE_AND_ID_AUX(NAME, BASE, SUB_CLASS_ID) |
Define a new exception class named <NAME>Exception that derives from <BASE>. | |
#define | OWBI1_DEFINE_EXCEPTION(NAME) OWBI1_DEFINE_EXCEPTION_WITH_BASE_AND_ID_AUX(NAME, ::OWBI1::Exception, ::OWBI1::Exception::UNKNOWN_SUBCLASS_ID) |
Define a new exception class named <NAME>Exception that derives from Exception. | |
#define | OWBI1_DEFINE_EXCEPTION_WITH_ID(NAME) OWBI1_DEFINE_EXCEPTION_WITH_BASE_AND_ID_AUX(NAME, ::OWBI1::Exception, ::OpenWBEM::ExceptionIds::NAME##ExceptionId) |
Define a new exception class named <NAME>Exception that derives from Exception. | |
#define | OWBI1_DEFINE_EXCEPTION_WITH_BASE_AND_ID(NAME, BASE) OWBI1_DEFINE_EXCEPTION_WITH_BASE_AND_ID_AUX(NAME, BASE, ::OpenWBEM::ExceptionIds::NAME##ExceptionId) |
Define a new exception class named <NAME>Exception that derives from <BASE>. | |
Functions | |
void | OWBI1::ExceptionDetail::portable_strerror_r (int errnum, char *buf, unsigned n) |
std::ostream & | OWBI1::operator<< (std::ostream &os, const Exception &e) |
Writes the exception object to the stream in the form: <file>: <line> <type>: <message>. | |
Variables | |
OWBI1_OWBI1PROVIFC_API | OWBI1::ExceptionDetail::FormatMsgImpl |
unsigned const | OWBI1::ExceptionDetail::BUFSZ = 1024 |
|
Declare a new exception class named <NAME>Exception that derives from Exception This macro is typically used in a header file.
Definition at line 371 of file OWBI1_Exception.hpp. |
|
Value: class LINKAGE_SPEC NAME##Exception : public BASE \ { \ public: \ NAME##Exception(const char* file, int line, const char* msg, int errorCode = ::OWBI1::Exception::UNKNOWN_ERROR_CODE, const Exception* otherException = 0, int subClassId = ::OWBI1::Exception::UNKNOWN_SUBCLASS_ID); \ virtual ~NAME##Exception() throw(); \ virtual const char* type() const; \ virtual NAME##Exception* clone() const; \ }; This macro is typically used in a header file. The exception class declaration will be prefaced with the linkage_spec parm. This allows the use of OWBI1_OWBI1PROVIFC_API when declaring exceptions. Example: OWBI1_DECLARE_APIEXCEPTION(Bogus, CIMException, OWBI1_OWBI1PROVIFC_API)
Definition at line 342 of file OWBI1_Exception.hpp. |
|
Declare a new exception class named <NAME>Exception that derives from Exception This macro is typically used in a header file.
Definition at line 361 of file OWBI1_Exception.hpp. |
|
Value: class NAME##Exception : public BASE \ { \ public: \ NAME##Exception(const char* file, int line, const char* msg, int errorCode = ::OWBI1::Exception::UNKNOWN_ERROR_CODE, const Exception* otherException = 0, int subClassId = ::OWBI1::Exception::UNKNOWN_SUBCLASS_ID); \ virtual ~NAME##Exception() throw(); \ virtual const char* type() const; \ virtual NAME##Exception* clone() const; \ }; This macro is typically used in a header file.
Definition at line 321 of file OWBI1_Exception.hpp. |
|
Define a new exception class named <NAME>Exception that derives from Exception. The new class will use UNKNOWN_SUBCLASS_ID for the subclass id. Use this macro for internal implementation exceptions that don't have an id. This macro is typically used in a cpp file.
Definition at line 412 of file OWBI1_Exception.hpp. |
|
Value: NAME##Exception::NAME##Exception(const char* file, int line, const char* msg, int errorCode, const ::OWBI1::Exception* otherException, int subClassId) \ : BASE(file, line, msg, errorCode, otherException, subClassId) {} \ NAME##Exception::~NAME##Exception() throw() { } \ NAME##Exception* NAME##Exception::clone() const { return new(std::nothrow) NAME##Exception(*this); } \ const char* NAME##Exception::type() const { return #NAME "Exception"; } The new class will use UNKNOWN_SUBCLASS_ID for the subclass id. This macro is typically used in a cpp file.
Definition at line 381 of file OWBI1_Exception.hpp. |
|
Define a new exception class named <NAME>Exception that derives from <BASE>. The new class will use ExceptionIds::<NAME>ExceptionId for the subclass id. Use this macro to create public exceptions that have an id in the OWBI1::ExceptionIds namespace that will derive from BASE This macro is typically used in a cpp file.
Definition at line 433 of file OWBI1_Exception.hpp. |
|
Value: NAME##Exception::NAME##Exception(const char* file, int line, const char* msg, int errorCode, const ::OWBI1::Exception* otherException, int subClassId) \ : BASE(file, line, msg, errorCode, otherException, subClassId == ::OWBI1::Exception::UNKNOWN_SUBCLASS_ID ? (SUB_CLASS_ID) : subClassId) {} \ NAME##Exception::~NAME##Exception() throw() { } \ NAME##Exception* NAME##Exception::clone() const { return new(std::nothrow) NAME##Exception(*this); } \ const char* NAME##Exception::type() const { return #NAME "Exception"; } The new class will use SUB_CLASS_ID for the subclass id. This macro is typically used in a cpp file.
Definition at line 397 of file OWBI1_Exception.hpp. |
|
Define a new exception class named <NAME>Exception that derives from Exception. The new class will use ExceptionIds::<NAME>ExceptionId for the subclass id. Use this macro to create public exceptions that have an id in the OWBI1::ExceptionIds namespace that derive from Exception This macro is typically used in a cpp file.
Definition at line 422 of file OWBI1_Exception.hpp. |
|
|
Throw an exception using __FILE__ and __LINE__.
Definition at line 268 of file OWBI1_Exception.hpp. Referenced by OWBI1::CIMInstance::getPropertyT(), and OWBI1::CIMBase::readSig(). |
|
Throw an exception using __FILE__ and __LINE__.
Definition at line 311 of file OWBI1_Exception.hpp. |
|
Throw an exception using __FILE__, __LINE__, errno and strerror(errno).
Definition at line 276 of file OWBI1_Exception.hpp. |
|
Throw an exception using __FILE__, __LINE__, errnum and strerror(errnum).
Definition at line 283 of file OWBI1_Exception.hpp. |
|
Throw an exception using __FILE__, __LINE__, errno and strerror(errno).
Definition at line 291 of file OWBI1_Exception.hpp. |
|
Value: throw ExceptionDetail::Errno< exType >:: \
format(__FILE__, __LINE__, (msg), (errnum))
Definition at line 299 of file OWBI1_Exception.hpp. |
|
Value: throw exType(__FILE__, __LINE__, (msg), \ ::OWBI1::Exception::UNKNOWN_ERROR_CODE, &(subex))
Definition at line 258 of file OWBI1_Exception.hpp. |
|
This macro is deprecated in 3.1.0.
Definition at line 249 of file OWBI1_Exception.hpp. |