From 4ceb3715a3a6b752009627b0dc6a1974664c03a1 Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Sun, 6 Dec 2009 22:23:11 +0100 Subject: remove std::string usage from class CABRTException. Signed-off-by: Denys Vlasenko --- inc/ABRTException.h | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) (limited to 'inc') 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 +#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 -- cgit