Minor improvements to Java director:except patch

This commit is contained in:
William S Fulton 2013-10-23 18:43:13 +01:00
commit 97fd20a58d
2 changed files with 3 additions and 2 deletions

View file

@ -38,8 +38,9 @@ class string;
%typemap(directorout) string %typemap(directorout) string
%{ if(!$input) { %{ if(!$input) {
if (!jenv->ExceptionCheck()) if (!jenv->ExceptionCheck()) {
SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null string"); SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null string");
}
return $null; return $null;
} }
const char *$1_pstr = (const char *)jenv->GetStringUTFChars($input, 0); const char *$1_pstr = (const char *)jenv->GetStringUTFChars($input, 0);

View file

@ -4225,7 +4225,7 @@ public:
} }
// Replace all occurrences of $error with common var name. // Replace all occurrences of $error with common var name.
Replaceall(featdirexcp, "$error", "thrown_"); Replaceall(featdirexcp, "$error", "swigerror");
Printf(w->code, " %s\n", featdirexcp); Printf(w->code, " %s\n", featdirexcp);
} }
Delete(featdirexcp); Delete(featdirexcp);