diff options
author | Olly Betts <olly@survex.com> | 2021-04-22 14:40:21 +1200 |
---|---|---|
committer | Olly Betts <olly@survex.com> | 2021-04-22 14:40:21 +1200 |
commit | 50426aae2058c1b2997e104400681f1224ac1336 (patch) | |
tree | 3b81bb281455facf1726cdd6e28114d6c3b2a4f9 /Examples/test-suite/director_exception.i | |
parent | 10d87100ea41b810ec341b6daf8ff7bc0ffcd50a (diff) | |
download | swig-50426aae2058c1b2997e104400681f1224ac1336.tar.gz |
Make PHP directors work more like other languages
A PHP exception now gets translated to a C++ exception to skips over C++
code to get back to PHP, avoiding the need to gate every directorout
typemap on EG(exception).
Diffstat (limited to 'Examples/test-suite/director_exception.i')
-rw-r--r-- | Examples/test-suite/director_exception.i | 17 |
1 files changed, 1 insertions, 16 deletions
diff --git a/Examples/test-suite/director_exception.i b/Examples/test-suite/director_exception.i index 71366bef0..9ff7f3842 100644 --- a/Examples/test-suite/director_exception.i +++ b/Examples/test-suite/director_exception.i @@ -18,22 +18,7 @@ namespace Swig { %include "std_string.i" -#ifdef SWIGPHP - -%feature("director:except") { - if ($error == FAILURE) { - Swig::DirectorMethodException::raise("$symname"); - } -} - -%exception { - try { $action } - catch (Swig::DirectorException &) { SWIG_fail; } -} - -#endif - -#ifdef SWIGPYTHON +#if defined SWIGPHP || defined SWIGPYTHON %feature("director:except") { if ($error != NULL) { |