Wider range of C# exceptions to throw. More applicable exceptions in are thrown.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@6985 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
6aca241887
commit
0e0573fa01
6 changed files with 173 additions and 65 deletions
|
|
@ -295,18 +295,18 @@ $1 = &temp; %}
|
|||
unsigned short {
|
||||
char error_msg[256];
|
||||
sprintf(error_msg, "C++ $1_type exception thrown, value: %d", $1);
|
||||
SWIG_CSharpSetPendingException(SWIG_CSharpSystemException, error_msg);
|
||||
SWIG_CSharpSetPendingException(SWIG_CSharpApplicationException, error_msg);
|
||||
return $null;
|
||||
}
|
||||
|
||||
%typemap(throws, canthrow=1) SWIGTYPE, SWIGTYPE &, SWIGTYPE *, SWIGTYPE [ANY] %{
|
||||
(void)$1;
|
||||
SWIG_CSharpSetPendingException(SWIG_CSharpSystemException, "C++ $1_type exception thrown");
|
||||
SWIG_CSharpSetPendingException(SWIG_CSharpApplicationException, "C++ $1_type exception thrown");
|
||||
return $null;
|
||||
%}
|
||||
|
||||
%typemap(throws, canthrow=1) char * %{
|
||||
SWIG_CSharpSetPendingException(SWIG_CSharpSystemException, $1);
|
||||
SWIG_CSharpSetPendingException(SWIG_CSharpApplicationException, $1);
|
||||
return $null;
|
||||
%}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue