27 #ifndef DSC_EXCEPTION_HXX
28 #define DSC_EXCEPTION_HXX
48 #if defined(_DEBUG_) || defined(_DEBUG)
50 # define LOC(message) (message), __FILE__ , __LINE__ , __FUNCTION__
52 # define LOC(message) (message), __FILE__, __LINE__
55 # define LOC(message) (message)
79 operator std::string()
97 const char *
makeText(
const char *text,
const char *fileName,
const unsigned int lineNumber);
109 const char *fileName=
"",
110 const unsigned int lineNumber=0,
111 const char *funcName=
"" ):
133 virtual const char*
what(
void )
const throw ()
135 return _what.c_str() ;
153 if ( strcmp(fileName,
"") )
154 oss << fileName <<
"##" << funcName;
168 #define DSC_EXCEPTION(Derived) struct Derived : public DSC_Exception { \
169 Derived ( const std::string & text, const char *fileName="", const unsigned int lineNumber=0, const char *funcName="" \
170 ) : DSC_Exception(text,fileName,lineNumber,funcName) { \
171 _exceptionName = #Derived; \
173 virtual ~Derived(void) throw();\
179 #define DSC_EXCEPTION_CXX(NameSpace,Derived) NameSpace::Derived::~Derived(void) throw() {};