aboutsummaryrefslogtreecommitdiff
path: root/Examples/test-suite/exception_partial_info.i
diff options
context:
space:
mode:
Diffstat (limited to 'Examples/test-suite/exception_partial_info.i')
-rw-r--r--Examples/test-suite/exception_partial_info.i10
1 files changed, 5 insertions, 5 deletions
diff --git a/Examples/test-suite/exception_partial_info.i b/Examples/test-suite/exception_partial_info.i
index 47b046735..3ac465cf6 100644
--- a/Examples/test-suite/exception_partial_info.i
+++ b/Examples/test-suite/exception_partial_info.i
@@ -2,10 +2,10 @@
// This produced compilable code for Tcl, Python in 1.3.27, fails in 1.3.29
+// throw is invalid in C++17 and later, only SWIG to use it
+#define TESTCASE_THROW1(T1) throw(T1)
%{
-#if defined(_MSC_VER)
- #pragma warning(disable: 4290) // C++ exception specification ignored except to indicate a function is not __declspec(nothrow)
-#endif
+#define TESTCASE_THROW1(T1)
%}
%{
@@ -36,8 +36,8 @@ class ex2 : public myException
class Impl
{
public:
- void f1() throw (myException) { ex1 e; throw e; }
- void f2() throw (myException) { ex2 e; throw e; }
+ void f1() TESTCASE_THROW1(myException) { ex1 e; throw e; }
+ void f2() TESTCASE_THROW1(myException) { ex2 e; throw e; }
};
%}