X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=libtest%2Ffatal.hpp;h=bb8cc938364b95076a3ed2ca038d43d65a4dbd21;hb=ad5cb8f903869065c72bb18bf98af6909189a5a9;hp=f0ee08131614f3ee3dc8d8b1ff9bce0eeae1b024;hpb=5c09a7ed2edbb9876493f30d59433331b63f6bfc;p=awesomized%2Flibmemcached diff --git a/libtest/fatal.hpp b/libtest/fatal.hpp index f0ee0813..bb8cc938 100644 --- a/libtest/fatal.hpp +++ b/libtest/fatal.hpp @@ -42,6 +42,13 @@ #define __PRETTY_FUNCTION__ __func__ #endif +#define YATL_STRINGIFY(x) #x +#define YATL_TOSTRING(x) YATL_STRINGIFY(x) +#define YATL_AT __FILE__ ":" YATL_TOSTRING(__LINE__) +#define YATL_AT_PARAM __func__, AT +#define YATL_UNIQUE __FILE__ ":" YATL_TOSTRING(__LINE__) "_unique" +#define YATL_UNIQUE_FUNC_NAME __FILE__ ":" YATL_TOSTRING(__LINE__) "_unique_func" + #define LIBYATL_DEFAULT_PARAM __FILE__, __LINE__, __PRETTY_FUNCTION__ namespace libtest { @@ -94,7 +101,7 @@ private: class disconnected : std::runtime_error { public: - disconnected(const char *file, int line, const char *func, const char *instance, const in_port_t port, const char *format, ...); + disconnected(const char *file, int line, const char *func, const std::string&, const in_port_t port, const char *format, ...); const char* what() const throw() {