X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=Utils%2FException.cci;h=189c2f1e24f21f47ff8433f24eaad4494fd6d546;hb=d2459b6c8249291588fd3d0d125ed3d38e003b55;hp=e7a9c53987163b9b8fa91800fbb57dddc78d5e11;hpb=034f9bec0a66d26314fb6ebc83dedf1618a2c19d;p=senf.git diff --git a/Utils/Exception.cci b/Utils/Exception.cci index e7a9c53..189c2f1 100644 --- a/Utils/Exception.cci +++ b/Utils/Exception.cci @@ -28,12 +28,36 @@ ///////////////////////////////cci.p/////////////////////////////////////// /////////////////////////////////////////////////////////////////////////// +// senf::ExceptionMixin + +prefix_ senf::ExceptionMixin::ExceptionMixin(std::string const & description) + : message_(description) +{ +#ifdef SENF_DEBUG + addBacktrace(); +#endif +} + +prefix_ std::string const & senf::ExceptionMixin::message() + const +{ + return message_; +} + +prefix_ void senf::ExceptionMixin::append(std::string text) +{ + message_ += text; +} + +/////////////////////////////////////////////////////////////////////////// // senf::Exception + prefix_ senf::Exception::Exception(std::string const & description) - : message_(description) + : ExceptionMixin(description) {} /////////////////////////////////////////////////////////////////////////// +// senf::SystemException prefix_ senf::SystemException::SystemException(std::string const & descr _SENF_EXC_DEBUG_ARGS_ND) {