From 97fd20a58d8273cb2097d7661ddde70ccf426cac Mon Sep 17 00:00:00 2001 From: William S Fulton Date: Wed, 23 Oct 2013 18:43:13 +0100 Subject: [PATCH] Minor improvements to Java director:except patch --- Lib/java/std_string.i | 3 ++- Source/Modules/java.cxx | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Lib/java/std_string.i b/Lib/java/std_string.i index 6b9cb90a4..5ad7d30bc 100644 --- a/Lib/java/std_string.i +++ b/Lib/java/std_string.i @@ -38,8 +38,9 @@ class string; %typemap(directorout) string %{ if(!$input) { - if (!jenv->ExceptionCheck()) + if (!jenv->ExceptionCheck()) { SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null string"); + } return $null; } const char *$1_pstr = (const char *)jenv->GetStringUTFChars($input, 0); diff --git a/Source/Modules/java.cxx b/Source/Modules/java.cxx index 40c60e4da..ab15b371f 100644 --- a/Source/Modules/java.cxx +++ b/Source/Modules/java.cxx @@ -4225,7 +4225,7 @@ public: } // Replace all occurrences of $error with common var name. - Replaceall(featdirexcp, "$error", "thrown_"); + Replaceall(featdirexcp, "$error", "swigerror"); Printf(w->code, " %s\n", featdirexcp); } Delete(featdirexcp);