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/mzscheme | |
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/mzscheme')
-rw-r--r-- | Lib/mzscheme/std_string.i | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Lib/mzscheme/std_string.i b/Lib/mzscheme/std_string.i index b19e8567a..70673eadf 100644 --- a/Lib/mzscheme/std_string.i +++ b/Lib/mzscheme/std_string.i @@ -52,6 +52,13 @@ namespace std { $result = scheme_make_string($1->c_str()); } + %typemap(throws) string { + scheme_signal_error("%s: %s", FUNC_NAME, $1.c_str()); + } + + %typemap(throws) const string & { + scheme_signal_error("%s: %s", FUNC_NAME, $1.c_str()); + } } |