X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=Utils%2FException.cci;h=6f7e13dc08ebf1c27bc44766b761d05d44393d30;hb=724c67ba71f9a232b53a4508ef3ab8575be29514;hp=3366fe23467d20109a35c3d00a3e941169c142ea;hpb=f5eba06e0b792b9e70555def60b0b98b8139381c;p=senf.git diff --git a/Utils/Exception.cci b/Utils/Exception.cci index 3366fe2..6f7e13d 100644 --- a/Utils/Exception.cci +++ b/Utils/Exception.cci @@ -31,23 +31,35 @@ // senf::ExceptionMixin prefix_ senf::ExceptionMixin::ExceptionMixin(std::string const & description) - : what_(description), - message_(description) + : what_(description) { #ifdef SENF_DEBUG addBacktrace(); #endif } -prefix_ std::string const & senf::ExceptionMixin::message() +prefix_ std::string senf::ExceptionMixin::message() const { - return message_; +#ifdef SENF_DEBUG + return what_.substr(excLen_); +#else + return what_; +#endif +} + +prefix_ std::string senf::ExceptionMixin::backtrace() + const +{ +#ifdef SENF_DEBUG + return what_.substr(0,excLen_-4); +#else + return ""; +#endif } prefix_ void senf::ExceptionMixin::append(std::string text) { - message_ += text; what_ += text; }