diff options
author | William S Fulton <wsf@fultondesigns.co.uk> | 2009-08-15 23:22:20 +0000 |
---|---|---|
committer | William S Fulton <wsf@fultondesigns.co.uk> | 2009-08-15 23:22:20 +0000 |
commit | 4516c1d3f363a1e75b5f1548ae5e5ef199f37cec (patch) | |
tree | fcd5ce4af8c347a8c6fe96b222d9f9a09ed50f52 /Lib/exception.i | |
parent | d74b680a79ee9cd68b4c92f882d68693d18bac28 (diff) | |
download | swig-4516c1d3f363a1e75b5f1548ae5e5ef199f37cec.tar.gz |
Fix exception handling when %catches is used in C#
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11583 626c5289-ae23-0410-ae9c-e8d60b6d4f22
Diffstat (limited to 'Lib/exception.i')
-rw-r--r-- | Lib/exception.i | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Lib/exception.i b/Lib/exception.i index e30ac1a5d..a1a47554e 100644 --- a/Lib/exception.i +++ b/Lib/exception.i @@ -262,9 +262,15 @@ SWIGINTERN void SWIG_CSharpException(int code, const char *msg) { /* rethrow the unknown exception */ +#ifdef SWIGCSHARP +%typemap(throws,noblock=1, canthrow=1) (...) { + SWIG_exception(SWIG_RuntimeError,"unknown exception"); +} +#else %typemap(throws,noblock=1) (...) { SWIG_exception(SWIG_RuntimeError,"unknown exception"); } +#endif #endif /* __cplusplus */ |