X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=Utils%2FException.cc;h=f94be754b992e56b8ee7a70c0dd2aa627f18619d;hb=d0776a27ffd63ab51b4e3419a8a6f87d11e60594;hp=61d5860d8b624c3a4666c17738d9b86fcf6f9894;hpb=a66bffcc77f006b22190e1c27cbe0cd75fc4501c;p=senf.git diff --git a/Utils/Exception.cc b/Utils/Exception.cc index 61d5860..f94be75 100644 --- a/Utils/Exception.cc +++ b/Utils/Exception.cc @@ -47,11 +47,16 @@ prefix_ char const * senf::Exception::what() /////////////////////////////////////////////////////////////////////////// // senf::SystemException -prefix_ void senf::SystemException::init(std::string const & descr, int code) +prefix_ void senf::SystemException::init(std::string const & descr, int code + _SENF_EXC_DEBUG_ARGS_ND) { code_ = code; +# ifdef SENF_DEBUG + if (file && line) + (*this) << "Exception at " << file << ":" << line << "\n"; +# endif (*this) << "[" << errorString() << "]"; - if (! descr.empty()) (*this) << "; " << descr; + if (! descr.empty()) (*this) << " " << descr; } ///////////////////////////////cc.e////////////////////////////////////////