mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
Reorganize C++ exceptions; ref #3470
There are 3 levels of C++ exception handling: * default - no C++ exception (use setjmp/longjmp) * enable_cxx_exception (use C++ exceptions with C ABI) * enable_cxx_abi (use C++ ABI including exceptions)
This commit is contained in:
@@ -7,8 +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
|
||||
#if defined(MRB_ENABLE_CXX_ABI)
|
||||
# if !defined(__cplusplus)
|
||||
# error Trying to use C++ exception handling in C code
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if defined(MRB_ENABLE_CXX_EXCEPTION) && defined(__cplusplus)
|
||||
|
||||
Reference in New Issue
Block a user