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:
Marcelo Matus 2006-01-21 08:05:56 +00:00
commit f6affcc2a0

View file

@ -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);