aboutsummaryrefslogtreecommitdiff
path: root/Lib/java/std_string.i
diff options
context:
space:
mode:
authorMarvin Greenberg <public.marvin@gmail.com>2013-10-22 20:31:14 +0100
committerWilliam S Fulton <wsf@fultondesigns.co.uk>2013-10-22 20:44:35 +0100
commit6736e74127180f012dab11379a2159cd073461d4 (patch)
tree07f0d845670f9d77ce303a9e1fdc5f139b1f7dbe /Lib/java/std_string.i
parentec1d5a5be1c7cdaaa8dedc3ba76a5792127cef0f (diff)
downloadswig-6736e74127180f012dab11379a2159cd073461d4.tar.gz
Add feature director:except for improved director exception handling in Java
Closes #91
Diffstat (limited to 'Lib/java/std_string.i')
-rw-r--r--Lib/java/std_string.i3
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/java/std_string.i b/Lib/java/std_string.i
index f178e6d43..6b9cb90a4 100644
--- a/Lib/java/std_string.i
+++ b/Lib/java/std_string.i
@@ -38,7 +38,8 @@ class string;
%typemap(directorout) string
%{ if(!$input) {
- SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null string");
+ if (!jenv->ExceptionCheck())
+ SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null string");
return $null;
}
const char *$1_pstr = (const char *)jenv->GetStringUTFChars($input, 0);