change for selective Backtrace (SENF_BACKTRACE). Included via autoconf if SENF_DEBUG...
[senf.git] / senf / Utils / Exception.cc
index caa13c4..1104513 100644 (file)
 //#include "Exception.ih"
 
 // Custom includes
-#include <execinfo.h>
+#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];
@@ -54,7 +56,7 @@ prefix_ void senf::ExceptionMixin::addBacktrace()
 }
 #endif
 
-/////////////////////////////////////////////////////////////////////////// 
+//-/////////////////////////////////////////////////////////////////////////////////////////////////
 // senf::Exception
 
 prefix_ senf::Exception::~Exception()
@@ -67,7 +69,7 @@ prefix_ char const * senf::Exception::what()
     return what_.c_str();
 }
 
-///////////////////////////////////////////////////////////////////////////
+//-/////////////////////////////////////////////////////////////////////////////////////////////////
 // senf::SystemException
 
 prefix_ void senf::SystemException::init(std::string const & descr, int code
@@ -82,7 +84,7 @@ prefix_ void senf::SystemException::init(std::string const & descr, int code
     if (! descr.empty()) (*this) << " " << descr;
 }
 
-///////////////////////////////cc.e////////////////////////////////////////
+//-/////////////////////////////////////////////////////////////////////////////////////////////////
 #undef prefix_
 
 \f