X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=Utils%2FException.cci;h=e7a9c53987163b9b8fa91800fbb57dddc78d5e11;hb=034f9bec0a66d26314fb6ebc83dedf1618a2c19d;hp=84f5d7b0e058f095491995a20606d98d62da3055;hpb=1d247d12d1759ffd77f456efe3a52f03dd289994;p=senf.git diff --git a/Utils/Exception.cci b/Utils/Exception.cci index 84f5d7b..e7a9c53 100644 --- a/Utils/Exception.cci +++ b/Utils/Exception.cci @@ -35,19 +35,20 @@ prefix_ senf::Exception::Exception(std::string const & description) /////////////////////////////////////////////////////////////////////////// -prefix_ senf::SystemException::SystemException(std::string const & where) +prefix_ senf::SystemException::SystemException(std::string const & descr _SENF_EXC_DEBUG_ARGS_ND) { - init(where, errno); + init(descr, errno _SENF_EXC_DEBUG_ARGS_P); } -prefix_ senf::SystemException::SystemException(int code) +prefix_ senf::SystemException::SystemException(int code _SENF_EXC_DEBUG_ARGS_ND) { - init("", code); + init("", code _SENF_EXC_DEBUG_ARGS_P); } -prefix_ senf::SystemException::SystemException(std::string const & where, int code) +prefix_ senf::SystemException::SystemException(std::string const & descr, int code + _SENF_EXC_DEBUG_ARGS_ND) { - init(where, code); + init(descr, code _SENF_EXC_DEBUG_ARGS_P); } prefix_ int senf::SystemException::errorNumber() @@ -56,7 +57,7 @@ prefix_ int senf::SystemException::errorNumber() return code_; } -prefix_ char const * senf::SystemException::description() +prefix_ char const * senf::SystemException::errorString() const { return std::strerror(code_); @@ -82,14 +83,6 @@ prefix_ senf::SystemException::~SystemException() throw() {} -prefix_ void senf::SystemException::init(std::string const & where, int code) -{ - code_ = code; - if (! where.empty()) - (*this) << where << ": "; - (*this) << "(" << code << ") " << description(); -} - ///////////////////////////////cci.e/////////////////////////////////////// #undef prefix_