diff --git a/Lib/ocaml/std_string.i b/Lib/ocaml/std_string.i index a8881a16c..2564cfb38 100644 --- a/Lib/ocaml/std_string.i +++ b/Lib/ocaml/std_string.i @@ -96,6 +96,9 @@ class wstring; } %typemap(typecheck) string, const string & = char *; + +%typemap(throws) string, const string & "SWIG_OCamlThrowException(SWIG_OCamlRuntimeException, $1.c_str());" + } #ifdef ENABLE_CHARPTR_ARRAY