summaryrefslogtreecommitdiff
path: root/indra/test
diff options
context:
space:
mode:
Diffstat (limited to 'indra/test')
-rw-r--r--indra/test/debug.h21
1 files changed, 4 insertions, 17 deletions
diff --git a/indra/test/debug.h b/indra/test/debug.h
index f92cce3008..3c4f3cabb4 100644
--- a/indra/test/debug.h
+++ b/indra/test/debug.h
@@ -31,6 +31,7 @@
#include "print.h"
#include "stringize.h"
+#include <exception> // std::uncaught_exceptions()
/*****************************************************************************
* Debugging stuff
@@ -65,10 +66,12 @@ public:
// non-copyable
Debug(const Debug&) = delete;
+ Debug& operator=(const Debug&) = delete;
~Debug()
{
- (*this)("exit");
+ auto exceptional{ std::uncaught_exceptions()? "exceptional " : "" };
+ (*this)(exceptional, "exit");
}
template <typename... ARGS>
@@ -90,20 +93,4 @@ private:
// of the Debug block.
#define DEBUG Debug debug(LL_PRETTY_FUNCTION)
-// 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 DEBUGEND \
- catch (...) \
- { \
- debug("*** exceptional "); \
- throw; \
- } \
-}
-
#endif /* ! defined(LL_DEBUG_H) */