X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=Utils%2FException.cc;h=c9a43f111f6ca8748406f9b7dfdc66af580286a9;hb=b2d64a4084a053f0887c7845bb81074e0cd3a855;hp=a5349100137cb5434ff65ec61c6565953b3bbd3c;hpb=c52cd7d87dbb525c1267aad27391b8b7365dbb57;p=senf.git diff --git a/Utils/Exception.cc b/Utils/Exception.cc index a534910..c9a43f1 100644 --- a/Utils/Exception.cc +++ b/Utils/Exception.cc @@ -27,14 +27,24 @@ // Custom includes #include +#include #define prefix_ ///////////////////////////////cc.p//////////////////////////////////////// +prefix_ void satcom::lib::SystemException::init() +{ + std::stringstream s; + if (where) + s << where << ": "; + s << "(" << err << ") " << std::strerror(err); + buffer_ = s.str(); +} + prefix_ char const * satcom::lib::SystemException::what() const throw() { - return std::strerror(this->err); + return buffer_.c_str(); } ///////////////////////////////cc.e////////////////////////////////////////