throws typemaps for std::wstring using C# patch #1799064 from David Piepgrass

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9956 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
William S Fulton 2007-09-25 21:35:24 +00:00
commit 23f8a0464c
3 changed files with 25 additions and 4 deletions

View file

@ -57,8 +57,8 @@ class wstring;
%typemap(typecheck) wstring = wchar_t *;
%typemap(throws, canthrow=1) wstring
%{ (void)$1;
SWIG_CSharpSetPendingException(SWIG_CSharpApplicationException, "wstring exception");
%{ std::string message($1.begin(), $1.end());
SWIG_CSharpSetPendingException(SWIG_CSharpApplicationException, message.c_str());
return $null; %}
// const wstring &
@ -109,8 +109,8 @@ class wstring;
%typemap(typecheck) const wstring & = wchar_t *;
%typemap(throws, canthrow=1) const wstring &
%{ (void)$1;
SWIG_CSharpSetPendingException(SWIG_CSharpApplicationException, "wstring exception");
%{ std::string message($1.begin(), $1.end());
SWIG_CSharpSetPendingException(SWIG_CSharpApplicationException, message.c_str());
return $null; %}
}