change for selective Backtrace (SENF_BACKTRACE). Included via autoconf if SENF_DEBUG...
[senf.git] / senf / Utils / Exception.cci
index 6f7e13d..20bcfd8 100644 (file)
 #include <cstring>
 
 #define prefix_ inline
-///////////////////////////////cci.p///////////////////////////////////////
+//-/////////////////////////////////////////////////////////////////////////////////////////////////
 
-///////////////////////////////////////////////////////////////////////////
+//-/////////////////////////////////////////////////////////////////////////////////////////////////
 // senf::ExceptionMixin
 
 prefix_ senf::ExceptionMixin::ExceptionMixin(std::string const & description)
     : what_(description)
 {
-#ifdef SENF_DEBUG
+#ifdef SENF_BACKTRACE
     addBacktrace();
 #endif
 }
@@ -63,14 +63,14 @@ prefix_ void senf::ExceptionMixin::append(std::string text)
     what_ += text;
 }
 
-///////////////////////////////////////////////////////////////////////////
+//-/////////////////////////////////////////////////////////////////////////////////////////////////
 // senf::Exception
 
 prefix_ senf::Exception::Exception(std::string const & description)
     : ExceptionMixin(description)
 {}
 
-///////////////////////////////////////////////////////////////////////////
+//-/////////////////////////////////////////////////////////////////////////////////////////////////
 // senf::SystemException
 
 prefix_ senf::SystemException::SystemException(std::string const & descr _SENF_EXC_DEBUG_ARGS_ND)
@@ -83,7 +83,7 @@ prefix_ senf::SystemException::SystemException(int code _SENF_EXC_DEBUG_ARGS_ND)
     init("", code _SENF_EXC_DEBUG_ARGS_P);
 }
 
-prefix_ senf::SystemException::SystemException(std::string const & descr, int code 
+prefix_ senf::SystemException::SystemException(std::string const & descr, int code
                                                _SENF_EXC_DEBUG_ARGS_ND)
 {
     init(descr, code _SENF_EXC_DEBUG_ARGS_P);
@@ -103,8 +103,9 @@ prefix_ char const * senf::SystemException::errorString()
 
 prefix_ bool senf::SystemException::anyOf(int c0, int c1, int c2, int c3, int c4, int c5,
                                           int c6, int c7, int c8, int c9)
+    const
 {
-    return 
+    return
         (c0 && code_ == c0) ||
         (c1 && code_ == c1) ||
         (c2 && code_ == c2) ||
@@ -121,7 +122,7 @@ prefix_  senf::SystemException::~SystemException()
     throw()
 {}
 
-///////////////////////////////cci.e///////////////////////////////////////
+//-/////////////////////////////////////////////////////////////////////////////////////////////////
 #undef prefix_
 
 \f