X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=libtest%2Ffatal.hpp;h=54f672b652a8808973de15800def96a430e8d009;hb=1be0350e7ae7a566896a9fe52863dcc22433fc8a;hp=bc288afeb767cf72498ee86348364dc830c5039f;hpb=1c012a73c8d584d485924348388c0975cdd71831;p=m6w6%2Flibmemcached diff --git a/libtest/fatal.hpp b/libtest/fatal.hpp index bc288afe..54f672b6 100644 --- a/libtest/fatal.hpp +++ b/libtest/fatal.hpp @@ -56,6 +56,11 @@ public: return _error_message; } + const char* mesg() const throw() + { + return _error_message; + } + // The following are just for unittesting the exception class static bool is_disabled(); static void disable(); @@ -63,8 +68,27 @@ public: static uint32_t disabled_counter(); static void increment_disabled_counter(); + int line() + { + return _line; + } + + const char* file() + { + return _file; + } + + const char* func() + { + return _func; + } + private: char _error_message[BUFSIZ]; + char _mesg[BUFSIZ]; + int _line; + const char* _file; + const char* _func; }; class disconnected : std::runtime_error