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:
William S Fulton 2005-02-22 22:56:18 +00:00
commit 0e0573fa01
6 changed files with 173 additions and 65 deletions

View file

@ -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;
%}