use SWIG_exception_fail for ruby and perl
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@8501 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
b63855287f
commit
f6affcc2a0
1 changed files with 10 additions and 0 deletions
|
|
@ -13,6 +13,15 @@
|
|||
user's throw declarations.
|
||||
*/
|
||||
|
||||
#if defined(SWIGPERL) || defined(SWIGRUBY)
|
||||
%exception {
|
||||
try {
|
||||
$action
|
||||
} catch(...) {
|
||||
SWIG_exception_fail(SWIG_RuntimeError,"postcatch unknown");
|
||||
}
|
||||
}
|
||||
#else
|
||||
%exception {
|
||||
try {
|
||||
$action
|
||||
|
|
@ -20,6 +29,7 @@
|
|||
SWIG_exception(SWIG_RuntimeError,"postcatch unknown");
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
%catches(E1,E2*,ET<int>,ET<double>,...) A::barfoo(int i);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue