summaryrefslogtreecommitdiff
path: root/Lib/csharp/std_string.i
diff options
context:
space:
mode:
authorWilliam S Fulton <wsf@fultondesigns.co.uk>2004-08-26 21:57:36 +0000
committerWilliam S Fulton <wsf@fultondesigns.co.uk>2004-08-26 21:57:36 +0000
commit26283a6945cbfc5787dd6e08f96290ec22f497f3 (patch)
tree942a1c48491b969e709a3dbd700ca0628162279f /Lib/csharp/std_string.i
parent7f1a06e20d8057a8cf535d1a16635aecb2d39118 (diff)
downloadswig-26283a6945cbfc5787dd6e08f96290ec22f497f3.tar.gz
throws typemaps added
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@6159 626c5289-ae23-0410-ae9c-e8d60b6d4f22
Diffstat (limited to 'Lib/csharp/std_string.i')
-rw-r--r--Lib/csharp/std_string.i8
1 files changed, 8 insertions, 0 deletions
diff --git a/Lib/csharp/std_string.i b/Lib/csharp/std_string.i
index 9eff76f35..73c164153 100644
--- a/Lib/csharp/std_string.i
+++ b/Lib/csharp/std_string.i
@@ -38,6 +38,10 @@ class string;
%typemap(typecheck) string = char *;
+%typemap(throws) string %{
+ SWIG_CSharpThrowException(SWIG_CSharpException, $1.c_str());
+%}
+
// const string &
%typemap(ctype) const string & "char *"
%typemap(imtype) const string & "string"
@@ -56,5 +60,9 @@ class string;
%typemap(typecheck) const string & = char *;
+%typemap(throws) const string & %{
+ SWIG_CSharpThrowException(SWIG_CSharpException, $1.c_str());
+%}
+
}