PPI: BUGFIX: Duplicate connector registration
[senf.git] / Utils / Exception.cci
index 189c2f1..6f7e13d 100644 (file)
 // senf::ExceptionMixin
 
 prefix_ senf::ExceptionMixin::ExceptionMixin(std::string const & 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;
 }
 
 ///////////////////////////////////////////////////////////////////////////