summaryrefslogtreecommitdiff
path: root/Examples/test-suite
diff options
context:
space:
mode:
authorKarl Wette <karl.wette@ligo.org>2017-01-22 11:53:12 +1300
committerKarl Wette <karl.wette@ligo.org>2017-01-22 11:53:12 +1300
commite24ec4089585f38b01ac2e73f1c7ddf5e6862341 (patch)
tree3821c376c808a640b96cf67086e9882c1e69772d /Examples/test-suite
parent52455b81d2018dad46eae587be1c7ddfd35750c4 (diff)
downloadswig-e24ec4089585f38b01ac2e73f1c7ddf5e6862341.tar.gz
Octave: add support for version 4.2
- .travis.yml: - ppa:kwwette/octaves has Octave version 4.2, also run C++11 tests - configure.ac: - prefer Octave program "octave-cli" to "octave" - extract any -std=* flags from CXX, add to OCTAVE_CXXFLAGS - Lib/typemaps/fragments.swg: - SWIG_isfinite_func(): extern "C++" is required as this fragment can end up inside an extern "C" { } block - Lib/octave: - add std_wstring.i (copied from std_string.i) for C++11 tests - Lib/octave/octrun.swg: - move Octave version-checking macros to octruntime.swg - Octave single()/double() functions now call .as_single()/.as_double() methods; redirect calls to __float__() method as per .scalar_value() - << and >> operators are no longer supported by Octave - Lib/octave/octruntime.swg: - move Octave version-checking macros here for conditional #includes - #include interpreter.h instead of #toplev.h - #include call-stack.h (now needed for octave_call_stack) - unwind_protect is now in octave:: namespace - error_state and warning_state are deprecated; use try/catch to catch errors in feval() instead - always set octave_exit = ::_Exit, to try to prevent segfault on exit - Lib/octave/octopers.swg: - << and >> operators are no longer supported by Octave - Lib/octave/exception.i: - Add macro SWIG_RETHROW_OCTAVE_EXCEPTIONS which rethrows any exceptions raised by Octave >= 4.2 - Examples/test-suite/exception_order.i: - Use macro SWIG_RETHROW_OCTAVE_EXCEPTIONS to rethrow exceptions raised by error() function in Octave >= 4.2 - Update Doc/Manual/Octave.html and CHANGES.current
Diffstat (limited to 'Examples/test-suite')
-rw-r--r--Examples/test-suite/exception_order.i12
1 files changed, 11 insertions, 1 deletions
diff --git a/Examples/test-suite/exception_order.i b/Examples/test-suite/exception_order.i
index bca745c7e..02674fef9 100644
--- a/Examples/test-suite/exception_order.i
+++ b/Examples/test-suite/exception_order.i
@@ -23,7 +23,17 @@
user's throw declarations.
*/
-#if defined(SWIGUTL)
+#if defined(SWIGOCTAVE)
+%exception {
+ try {
+ $action
+ }
+ SWIG_RETHROW_OCTAVE_EXCEPTIONS
+ catch(...) {
+ SWIG_exception(SWIG_RuntimeError,"postcatch unknown");
+ }
+}
+#elif defined(SWIGUTL)
%exception {
try {
$action