hopefully fixes for backtrace handling
[senf.git] / senf / Utils / Exception.cc
index 1b3763c..5c90493 100644 (file)
 //#include "Exception.ih"
 
 // Custom includes
-#ifdef SENF_DEBUG
+#ifdef SENF_BACKTRACE
    #include <execinfo.h>
 #endif
 #include <sstream>
-#include <senf/config.hh>
 #include "Backtrace.hh"
 
 #define prefix_
-///////////////////////////////cc.p////////////////////////////////////////
+//-/////////////////////////////////////////////////////////////////////////////////////////////////
 
-///////////////////////////////////////////////////////////////////////////
+//-/////////////////////////////////////////////////////////////////////////////////////////////////
 // senf::Exception
 
-#ifdef SENF_DEBUG
+#ifdef SENF_BACKTRACE
 prefix_ void senf::ExceptionMixin::addBacktrace()
 {
     void * entries[SENF_DEBUG_BACKTRACE_NUMCALLERS];
-    unsigned nEntries( ::backtrace(entries, SENF_DEBUG_BACKTRACE_NUMCALLERS) );
+    int nEntries (::backtrace(entries, SENF_DEBUG_BACKTRACE_NUMCALLERS));
 
     std::stringstream ss;
     ss << "\nException at\n";
@@ -56,7 +55,7 @@ prefix_ void senf::ExceptionMixin::addBacktrace()
 }
 #endif
 
-/////////////////////////////////////////////////////////////////////////// 
+//-/////////////////////////////////////////////////////////////////////////////////////////////////
 // senf::Exception
 
 prefix_ senf::Exception::~Exception()
@@ -69,7 +68,7 @@ prefix_ char const * senf::Exception::what()
     return what_.c_str();
 }
 
-///////////////////////////////////////////////////////////////////////////
+//-/////////////////////////////////////////////////////////////////////////////////////////////////
 // senf::SystemException
 
 prefix_ void senf::SystemException::init(std::string const & descr, int code
@@ -84,7 +83,7 @@ prefix_ void senf::SystemException::init(std::string const & descr, int code
     if (! descr.empty()) (*this) << " " << descr;
 }
 
-///////////////////////////////cc.e////////////////////////////////////////
+//-/////////////////////////////////////////////////////////////////////////////////////////////////
 #undef prefix_
 
 \f