about summary refs log tree commit diff
path: root/absl/base/macros.h
diff options
context:
space:
mode:
Diffstat (limited to 'absl/base/macros.h')
-rw-r--r--absl/base/macros.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/absl/base/macros.h b/absl/base/macros.h
index ca3d5edb6536..9e7ab375eed8 100644
--- a/absl/base/macros.h
+++ b/absl/base/macros.h
@@ -199,4 +199,14 @@ enum LinkerInitialized {
                              : [] { assert(false && #expr); }())  // NOLINT
 #endif
 
+#ifdef ABSL_HAVE_EXCEPTIONS
+#define ABSL_INTERNAL_TRY try
+#define ABSL_INTERNAL_CATCH_ANY catch (...)
+#define ABSL_INTERNAL_RETHROW do { throw; } while (false)
+#else  // ABSL_HAVE_EXCEPTIONS
+#define ABSL_INTERNAL_TRY if (true)
+#define ABSL_INTERNAL_CATCH_ANY else if (false)
+#define ABSL_INTERNAL_RETHROW do {} while (false)
+#endif  // ABSL_HAVE_EXCEPTIONS
+
 #endif  // ABSL_BASE_MACROS_H_