diff options
author | William S Fulton <wsf@fultondesigns.co.uk> | 2005-02-15 22:09:06 +0000 |
---|---|---|
committer | William S Fulton <wsf@fultondesigns.co.uk> | 2005-02-15 22:09:06 +0000 |
commit | c8b6a0687cab92968ced53ef179662ee06eadda1 (patch) | |
tree | 22ef8180ac55d5ee8e7f69c667022b562790fe17 /Lib/exception.i | |
parent | 97ed6ef9f36611f78e264c4df982e318eb70c231 (diff) | |
download | swig-c8b6a0687cab92968ced53ef179662ee06eadda1.tar.gz |
Fixes to SWIG_exception for C# and Java
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@6951 626c5289-ae23-0410-ae9c-e8d60b6d4f22
Diffstat (limited to 'Lib/exception.i')
-rw-r--r-- | Lib/exception.i | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/Lib/exception.i b/Lib/exception.i index 79cd0d7b5..3bd354cd3 100644 --- a/Lib/exception.i +++ b/Lib/exception.i @@ -188,7 +188,7 @@ static void SWIG_JavaException(JNIEnv *jenv, int code, const char *msg) { } SWIG_JavaThrowException(jenv, exception_code, msg); } -#define SWIG_exception(code, msg) { SWIG_JavaException(jenv, code, msg); } +#define SWIG_exception(nullreturn, code, msg) { SWIG_JavaException(jenv, code, msg); return nullreturn; } %} #endif // SWIGJAVA @@ -270,8 +270,8 @@ static void SWIG_exception_(int code, const char *msg) { #ifdef SWIGCSHARP %{ -static void SWIG_exception(int code, const char *msg) { - SWIG_CSharpExceptionCodes exception_code = SWIG_CSharpException; +static void SWIG_CSharpException(int code, const char *msg) { + SWIG_CSharpExceptionCodes exception_code = SWIG_CSharpSystemException; switch(code) { case SWIG_MemoryError: exception_code = SWIG_CSharpOutOfMemoryException; @@ -293,11 +293,12 @@ static void SWIG_exception(int code, const char *msg) { case SWIG_SystemError: case SWIG_UnknownError: default: - exception_code = SWIG_CSharpException; + exception_code = SWIG_CSharpSystemException; break; } - SWIG_CSharpThrowException(exception_code, msg); + SWIG_CSharpSetPendingException(exception_code, msg); } +#define SWIG_exception(nullreturn, code, msg) { SWIG_CSharpException(code, msg); return nullreturn; } %} #endif // SWIGCSHARP |