1 #ifndef UTIL_EXCEPTION_H
2 #define UTIL_EXCEPTION_H
7 # define MAXTRACESIZE 20
16 $Date: 2007-03-23 11:31:02 +0100 (Fri, 23 Mar 2007) $
18 The class Exception and its subclasses indicate conditions
19 that a reasonable application might want to catch.
21 class LowLevelException
{
24 LowLevelException(const LowLevelException
& ex
);
25 virtual ~LowLevelException();
28 const std::string
& message() const;
29 void printStackTrace() const;
30 void printStackTrace(std::ostream
& str
) const;
33 void fillInStackTrace();
37 #if ! defined(DISABLESTACKTRACE)
38 void *callersAddr
[MAXTRACESIZE
];
43 class Exception
: public LowLevelException
{
46 Exception(const char * msg
) { this->msg
= msg
; }
47 Exception(const std::string
& msg
) { this->msg
= msg
; }
51 Returns the error message string of this exception.
53 inline const std::string
& LowLevelException::message() const {