summaryrefslogtreecommitdiff
path: root/indra/test/debug.h
diff options
context:
space:
mode:
authorNat Goodspeed <nat@lindenlab.com>2024-02-27 11:22:31 -0500
committerNat Goodspeed <nat@lindenlab.com>2024-02-27 11:22:31 -0500
commitedf1a712a7ca8fd741514348e3304af6a766f4aa (patch)
tree0cecaa9b4be0958dc7ff126c30382da3781f1f60 /indra/test/debug.h
parent01a94f9d8378bb1094f4272b37ed9b966703f0b6 (diff)
parentad32c066691152e6a23f025d6aa5ead0e91b7be9 (diff)
Merge branch 'release/luau-scripting' into luau-require-impl.
Diffstat (limited to 'indra/test/debug.h')
-rw-r--r--indra/test/debug.h16
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 "); \