diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2009-12-06 22:23:11 +0100 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2009-12-06 22:23:11 +0100 |
commit | 4ceb3715a3a6b752009627b0dc6a1974664c03a1 (patch) | |
tree | 8c96d097e7e63f905925419a8a65c814d407605f /inc/ABRTException.h | |
parent | f66aa07338bbc8a8a80264ec5be3ae25b677d94a (diff) | |
download | abrt-4ceb3715a3a6b752009627b0dc6a1974664c03a1.tar.gz abrt-4ceb3715a3a6b752009627b0dc6a1974664c03a1.tar.xz abrt-4ceb3715a3a6b752009627b0dc6a1974664c03a1.zip |
remove std::string usage from class CABRTException.
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'inc/ABRTException.h')
-rw-r--r-- | inc/ABRTException.h | 26 |
1 files changed, 12 insertions, 14 deletions
diff --git a/inc/ABRTException.h b/inc/ABRTException.h index fe7fc01e..dc18132e 100644 --- a/inc/ABRTException.h +++ b/inc/ABRTException.h @@ -1,7 +1,7 @@ #ifndef ABRTEXCEPTION_H_ #define ABRTEXCEPTION_H_ -#include <string> +#include "abrtlib.h" typedef enum { EXCEP_UNKNOW, @@ -21,21 +21,19 @@ typedef enum { class CABRTException /*: public std::exception*/ { private: - std::string m_sWhat; - abrt_exception_t m_Type; + abrt_exception_t m_type; + char *m_what; + + /* Not defined. You can't use it */ + CABRTException& operator= (const CABRTException&); public: - /* virtual ~CABRTException() throw() {} */ - CABRTException(abrt_exception_t pType, const char* pWhat) : - m_sWhat(pWhat), - m_Type(pType) - {} - CABRTException(abrt_exception_t pType, const std::string& pWhat) : - m_sWhat(pWhat), - m_Type(pType) - {} - abrt_exception_t type() { return m_Type; } - const char* what() const { return m_sWhat.c_str(); } + ~CABRTException() { free(m_what); } + CABRTException(abrt_exception_t type, const char* fmt, ...); + CABRTException(const CABRTException& rhs); + + abrt_exception_t type() { return m_type; } + const char* what() const { return m_what; } }; #endif |