X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=Utils%2FException.cci;h=efe49618d6ec26100f7739dee85eb0ce4a63ea98;hb=5924d77edecbcaff60821afb9fd13169b0a2e2ec;hp=9903becd7037329f25382d27b2505ed49b100450;hpb=96d3a2a43b4e6d7693a136a3adeb099440f19068;p=senf.git diff --git a/Utils/Exception.cci b/Utils/Exception.cci index 9903bec..efe4961 100644 --- a/Utils/Exception.cci +++ b/Utils/Exception.cci @@ -27,43 +27,30 @@ #define prefix_ inline ///////////////////////////////cci.p/////////////////////////////////////// -prefix_ senf::SystemException::SystemException() - : where_(0), code_(errno) -{ - init(); -} - -prefix_ senf::SystemException::SystemException(int code) - : where_(0), code_(code) -{ - init(); -} +/////////////////////////////////////////////////////////////////////////// +// senf::Exception +prefix_ senf::Exception::Exception(std::string const & description) + : message_(description) +{} -prefix_ senf::SystemException::SystemException(char const * where) - : where_(where), code_(errno) -{ - init(); -} +/////////////////////////////////////////////////////////////////////////// -prefix_ senf::SystemException::SystemException(char const * where, int code) - : where_(where), code_(code) +prefix_ senf::SystemException::SystemException(std::string const & where) { - init(); + init(where, errno); } -prefix_ char const * senf::SystemException::what() - const throw() +prefix_ senf::SystemException::SystemException(int code) { - return buffer_.c_str(); + init("", code); } -prefix_ char const * senf::SystemException::where() - const +prefix_ senf::SystemException::SystemException(std::string const & where, int code) { - return where_; + init(where, code); } -prefix_ int senf::SystemException::code() +prefix_ int senf::SystemException::errorNumber() const { return code_; @@ -95,21 +82,6 @@ prefix_ senf::SystemException::~SystemException() throw() {} -prefix_ void senf::throwErrno() -{ - throwErrno(0, errno); -} - -prefix_ void senf::throwErrno(char const * where) -{ - throwErrno(where, errno); -} - -prefix_ void senf::throwErrno(int code) -{ - throwErrno(0, code); -} - ///////////////////////////////cci.e/////////////////////////////////////// #undef prefix_