Added test that checks the order between the global %except handler and local throw() definitions

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@4766 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Marcelo Matus 2003-05-02 21:19:36 +00:00
commit 20bf783966
3 changed files with 47 additions and 1 deletions

View file

@ -0,0 +1,31 @@
%module exception_order
%include "exception.i"
#if 1
%exception {
try {
$action
} catch(...) {
SWIG_exception(SWIG_RuntimeError,"Unknown exception");
}
}
#endif
%inline %{
struct E
{
};
struct A
{
int foo() throw(E)
{
throw E();
return 0;
}
};
%}