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:
parent
214a1839ee
commit
98d8be6bd1
2 changed files with 26 additions and 0 deletions
|
|
@ -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"); }
|
||||
%}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue