summaryrefslogtreecommitdiff
path: root/src/common.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/common.h')
-rw-r--r--src/common.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/common.h b/src/common.h
index dbbf28b8..d12edb0a 100644
--- a/src/common.h
+++ b/src/common.h
@@ -76,6 +76,10 @@
#if WITH_EXCEPTIONS
#define WABT_TRY try {
+#define WABT_CATCH_BAD_ALLOC \
+ } \
+ catch (std::bad_alloc&) { \
+ }
#define WABT_CATCH_BAD_ALLOC_AND_EXIT \
} \
catch (std::bad_alloc&) { \
@@ -83,6 +87,7 @@
}
#else
#define WABT_TRY
+#define WABT_CATCH_BAD_ALLOC
#define WABT_CATCH_BAD_ALLOC_AND_EXIT
#endif