diff options
author | William S Fulton <wsf@fultondesigns.co.uk> | 2022-09-18 20:20:21 +0100 |
---|---|---|
committer | William S Fulton <wsf@fultondesigns.co.uk> | 2022-09-19 09:09:29 +0100 |
commit | ed333b6b9720e0569cd3c7ccee8f1fc1b60da9f8 (patch) | |
tree | 8a0e78d0ce7353aab44e8a5452833d535db4991a /Lib/go | |
parent | 4a29229bab06cd5ab21715c93c03e9280feae065 (diff) | |
download | swig-ed333b6b9720e0569cd3c7ccee8f1fc1b60da9f8.tar.gz |
std::string throws typemaps
Go, Guile, Racket, Scilab: Add throws typemaps for std::string so that
thrown string exception messages can be seen.
Test all language for std::string throws typemaps
Diffstat (limited to 'Lib/go')
-rw-r--r-- | Lib/go/std_string.i | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Lib/go/std_string.i b/Lib/go/std_string.i index 3abf04cae..35b4a5e46 100644 --- a/Lib/go/std_string.i +++ b/Lib/go/std_string.i @@ -52,6 +52,9 @@ class string; %typemap(godirectorin,fragment="CopyString") string %{ $result = swigCopyString($input) %} +%typemap(throws) string +%{ _swig_gopanic($1.c_str()); %} + %typemap(in) const string & %{ $*1_ltype $1_str($input.p, $input.n); @@ -88,6 +91,9 @@ class string; %typemap(godirectorin,fragment="CopyString") const string & %{ $result = swigCopyString($input) %} +%typemap(throws) const string & +%{ _swig_gopanic($1.c_str()); %} + %typemap(gotype) string * "*string" |