aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWilliam S Fulton <wsf@fultondesigns.co.uk>2019-08-20 07:06:46 +0100
committerWilliam S Fulton <wsf@fultondesigns.co.uk>2019-08-20 07:06:46 +0100
commit4f948d01d65fb92fbcc65fcb8cabe36220e8fbf5 (patch)
treebcdfc16b3c648de54f19965292b623f98da3bf4a
parent1e8dad2084888092ea0efa9a8ec7424fced215e9 (diff)
parent85edc6de99af6649ac2d95495083750e7a44dc3b (diff)
downloadswig-4f948d01d65fb92fbcc65fcb8cabe36220e8fbf5.tar.gz
Merge branch 'illegal_state_except'
* illegal_state_except: [Java] Add support for throwing IllegalStateException
-rw-r--r--Lib/java/javahead.swg12
1 files changed, 7 insertions, 5 deletions
diff --git a/Lib/java/javahead.swg b/Lib/java/javahead.swg
index 685bba198..2e10254f3 100644
--- a/Lib/java/javahead.swg
+++ b/Lib/java/javahead.swg
@@ -5,7 +5,7 @@
* ----------------------------------------------------------------------------- */
-/* JNI function calls require different calling conventions for C and C++. These JCALL macros are used so
+/* JNI function calls require different calling conventions for C and C++. These JCALL macros are used so
* that the same typemaps can be used for generating code for both C and C++. The SWIG preprocessor can expand
* the macros thereby generating the correct calling convention. It is thus essential that all typemaps that
* use the macros are not within %{ %} brackets as they won't be run through the SWIG preprocessor. */
@@ -50,15 +50,16 @@
%insert(runtime) %{
/* Support for throwing Java exceptions */
typedef enum {
- SWIG_JavaOutOfMemoryError = 1,
- SWIG_JavaIOException,
- SWIG_JavaRuntimeException,
+ SWIG_JavaOutOfMemoryError = 1,
+ SWIG_JavaIOException,
+ SWIG_JavaRuntimeException,
SWIG_JavaIndexOutOfBoundsException,
SWIG_JavaArithmeticException,
SWIG_JavaIllegalArgumentException,
SWIG_JavaNullPointerException,
SWIG_JavaDirectorPureVirtual,
- SWIG_JavaUnknownError
+ SWIG_JavaUnknownError,
+ SWIG_JavaIllegalStateException,
} SWIG_JavaExceptionCodes;
typedef struct {
@@ -80,6 +81,7 @@ static void SWIGUNUSED SWIG_JavaThrowException(JNIEnv *jenv, SWIG_JavaExceptionC
{ SWIG_JavaNullPointerException, "java/lang/NullPointerException" },
{ SWIG_JavaDirectorPureVirtual, "java/lang/RuntimeException" },
{ SWIG_JavaUnknownError, "java/lang/UnknownError" },
+ { SWIG_JavaIllegalStateException, "java/lang/IllegalStateException" },
{ (SWIG_JavaExceptionCodes)0, "java/lang/UnknownError" }
};
const SWIG_JavaExceptions_t *except_ptr = java_exceptions;