From 91080872a8c45abf850e51941bc751a6ddc48b71 Mon Sep 17 00:00:00 2001 From: William S Fulton Date: Fri, 17 Nov 2017 20:20:05 +0000 Subject: [PATCH] Tidy up director_exception testcase --- Examples/test-suite/director_exception.i | 28 ++++++++++-------------- 1 file changed, 12 insertions(+), 16 deletions(-) diff --git a/Examples/test-suite/director_exception.i b/Examples/test-suite/director_exception.i index 1ce14dedf..e25bfdcca 100644 --- a/Examples/test-suite/director_exception.i +++ b/Examples/test-suite/director_exception.i @@ -20,14 +20,10 @@ #ifndef SWIG_DIRECTORS namespace Swig { -class DirectorException {}; -class DirectorMethodException: public Swig::DirectorException {}; + class DirectorException {}; + class DirectorMethodException: public Swig::DirectorException {}; } - #ifndef SWIG_fail - #define SWIG_fail - #endif #endif /* !SWIG_DIRECTORS */ - %} %include "std_string.i" @@ -41,8 +37,8 @@ class DirectorMethodException: public Swig::DirectorException {}; } %exception { - try { $action } - catch (Swig::DirectorException &) { SWIG_fail; } + try { $action } + catch (Swig::DirectorException &) { SWIG_fail; } } #endif @@ -56,8 +52,8 @@ class DirectorMethodException: public Swig::DirectorException {}; } %exception { - try { $action } - catch (Swig::DirectorException &) { SWIG_fail; } + try { $action } + catch (Swig::DirectorException &) { SWIG_fail; } } #endif @@ -75,12 +71,12 @@ class DirectorMethodException: public Swig::DirectorException {}; // Change back to old 2.0 default behavior %feature("director:except") { - jthrowable $error = jenv->ExceptionOccurred(); - if ($error) { - // Dont clear exception, still be active when return to java execution - // Essentially ignore exception occurred -- old behavior. - return $null; - } + jthrowable $error = jenv->ExceptionOccurred(); + if ($error) { + // Dont clear exception, still be active when return to java execution + // Essentially ignore exception occurred -- old behavior. + return $null; + } } #endif