#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_;
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_