Fix global Doxyfile
[senf.git] / Utils / Exception.cc
index a534910..2798216 100644 (file)
 
 // Custom includes
 #include <cstring>
+#include <sstream>
 
 #define prefix_
 ///////////////////////////////cc.p////////////////////////////////////////
 
-prefix_ char const * satcom::lib::SystemException::what()
+prefix_ void senf::SystemException::init()
+{
+    std::stringstream s;
+    if (where)
+        s << where << ": ";
+    s << "(" << err << ") " << std::strerror(err);
+    buffer_ = s.str();
+}
+
+prefix_ char const * senf::SystemException::what()
     const throw()
 {
-    return std::strerror(this->err);
+    return buffer_.c_str();
 }
 
 ///////////////////////////////cc.e////////////////////////////////////////
@@ -43,5 +53,5 @@ prefix_ char const * satcom::lib::SystemException::what()
 \f
 // Local Variables:
 // mode: c++
-// c-file-style: "satcom"
+// c-file-style: "senf"
 // End: