X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=Utils%2FException.cc;h=b2c750f383c55a27d449c0853fdec59a085b4fa2;hb=412024ed31a4ab4eaea7a4165a434f8efebee325;hp=c86dade4de885d53b8ec5e424cef80ae80451efc;hpb=8ec0b7ed2df36144b52df5aa40497fc5409c31f7;p=senf.git diff --git a/Utils/Exception.cc b/Utils/Exception.cc index c86dade..b2c750f 100644 --- a/Utils/Exception.cc +++ b/Utils/Exception.cc @@ -30,7 +30,7 @@ #include #include #include "../config.hh" -#include "impl/demangle.h" +#include "Backtrace.hh" #define prefix_ ///////////////////////////////cc.p//////////////////////////////////////// @@ -38,48 +38,33 @@ /////////////////////////////////////////////////////////////////////////// // senf::Exception -prefix_ senf::Exception::~Exception() - throw() -{} - -prefix_ char const * senf::Exception::what() - const throw() -{ - return message_.c_str(); -} - #ifdef SENF_DEBUG -prefix_ void senf::Exception::addBacktrace() +prefix_ void senf::ExceptionMixin::addBacktrace() { void * entries[SENF_DEBUG_BACKTRACE_NUMCALLERS]; unsigned nEntries( ::backtrace(entries, SENF_DEBUG_BACKTRACE_NUMCALLERS) ); - char ** symbols = ::backtrace_symbols(entries, nEntries); - + std::stringstream ss; ss << "\nException at\n"; - for (unsigned i=0; i