Index: uspace/lib/cpp/include/internal/trycatch.hpp
===================================================================
--- uspace/lib/cpp/include/internal/trycatch.hpp	(revision e7970fe32632b0740d6acf92c6785d5069a172f8)
+++ uspace/lib/cpp/include/internal/trycatch.hpp	(revision 6fa83f01510d51902aaa3ba7f8f7e1e8d6643fab)
@@ -116,4 +116,20 @@
     if constexpr (expr = {}; ::std::aux::catch_blocks_allowed)
 
+/**
+ * This macro can be used for testing the library. If
+ * exception handling is not available, it uses the
+ * internal bool variable and if it is, it uses a
+ * universal catch clause in which it sets the passed
+ * checking variable to true.
+ */
+#define LIBCPP_EXCEPTION_THROW_CHECK(variable) \
+    variable = ::std::aux::exception_thrown
+
+#else
+#define LIBCPP_EXCEPTION_THROW_CHECK(variable) \
+    catch (...) \
+    { \
+        variable = true; \
+    }
 #endif
 
