diff options
author | nat-goodspeed <nat@lindenlab.com> | 2024-02-23 11:39:24 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-23 11:39:24 -0500 |
commit | ad32c066691152e6a23f025d6aa5ead0e91b7be9 (patch) | |
tree | 95256b06398914fc8a91b35e60d7de9a78d90a02 /indra/test/debug.h | |
parent | b631f9aa218e56b12b4648a37f92ddf405eaa0f4 (diff) | |
parent | 904d82402c8b927f5e09830d10247079fb4a94f4 (diff) |
Merge pull request #879 from secondlife/lua-events
Lua listen_events(), await_event() => get_event_pumps(), get_event_next().
Diffstat (limited to 'indra/test/debug.h')
-rw-r--r-- | indra/test/debug.h | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/indra/test/debug.h b/indra/test/debug.h index 76dbb973b2..f92cce3008 100644 --- a/indra/test/debug.h +++ b/indra/test/debug.h @@ -30,6 +30,7 @@ #define LL_DEBUG_H #include "print.h" +#include "stringize.h" /***************************************************************************** * Debugging stuff @@ -52,8 +53,9 @@ class Debug { public: - Debug(const std::string& block): - mBlock(block), + template <typename... ARGS> + Debug(ARGS&&... args): + mBlock(stringize(std::forward<ARGS>(args)...)), mLOGTEST(getenv("LOGTEST")), // debug output enabled when LOGTEST is set AND non-empty mEnabled(mLOGTEST && *mLOGTEST) @@ -88,15 +90,15 @@ private: // of the Debug block. #define DEBUG Debug debug(LL_PRETTY_FUNCTION) -// These BEGIN/END macros are specifically for debugging output -- please -// don't assume you must use such for coroutines in general! They only help to -// make control flow (as well as exception exits) explicit. -#define BEGIN \ +// These DEBUGIN/DEBUGEND macros are specifically for debugging output -- +// please don't assume you must use such for coroutines in general! They only +// help to make control flow (as well as exception exits) explicit. +#define DEBUGIN \ { \ DEBUG; \ try -#define END \ +#define DEBUGEND \ catch (...) \ { \ debug("*** exceptional "); \ |