summaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/mruby/throw.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/mruby/throw.h b/include/mruby/throw.h
index 5dd1d0a9f..010793027 100644
--- a/include/mruby/throw.h
+++ b/include/mruby/throw.h
@@ -7,6 +7,10 @@
#ifndef MRB_THROW_H
#define MRB_THROW_H
+#if defined(MRB_ENABLE_CXX_EXCEPTION) && !defined(__cplusplus)
+#error Trying to use C++ exception handling in C code
+#endif
+
#if defined(MRB_ENABLE_CXX_EXCEPTION) && defined(__cplusplus)
#define MRB_TRY(buf) do { try {