X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=Utils%2FException.hh;h=fefe136f81af4f306d65dcb18e3f13a3e1371e39;hb=8ec0b7ed2df36144b52df5aa40497fc5409c31f7;hp=5f00926f4c64ee639965351ef17bcd55647cc598;hpb=18ebf1e9edb34f1aa8a32173275421a5d54400f7;p=senf.git diff --git a/Utils/Exception.hh b/Utils/Exception.hh index 5f00926..fefe136 100644 --- a/Utils/Exception.hh +++ b/Utils/Exception.hh @@ -79,6 +79,11 @@ struct FooException : public senf::Exception { FooException() : senf::Exception("Foo hit the fan") {} }; \endcode + + If SENF is compiled in debug mode (SENF_DEBUG is defined), the exception message will + automatically include a stack backtrace. For this to work, you need to add the + -rdynamic option to all link commands. This feature depends on gcc and + the GNU-libc. */ namespace senf { @@ -117,6 +122,9 @@ namespace senf { exceptions. */ private: +#ifdef SENF_DEBUG + void addBacktrace(); +#endif std::string message_; };