Add inner exception tests

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@8934 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
William S Fulton 2006-03-02 23:19:56 +00:00
commit 98d8be6bd1
2 changed files with 26 additions and 0 deletions

View file

@ -223,3 +223,17 @@ struct ThrowsClass {
}
};
%}
// test inner exceptions
%exception InnerExceptionTest() {
try {
$action
} catch(Ex &e) {
SWIG_CSharpSetPendingException(SWIG_CSharpApplicationException, e.what());
SWIG_CSharpSetPendingException(SWIG_CSharpInvalidOperationException, "My OuterException message");
}
}
%inline %{
void InnerExceptionTest() { throw Ex("My InnerException message"); }
%}