summaryrefslogtreecommitdiff
path: root/Lib/mzscheme
diff options
context:
space:
mode:
authorWilliam S Fulton <wsf@fultondesigns.co.uk>2022-09-18 20:20:21 +0100
committerWilliam S Fulton <wsf@fultondesigns.co.uk>2022-09-19 09:09:29 +0100
commited333b6b9720e0569cd3c7ccee8f1fc1b60da9f8 (patch)
tree8a0e78d0ce7353aab44e8a5452833d535db4991a /Lib/mzscheme
parent4a29229bab06cd5ab21715c93c03e9280feae065 (diff)
downloadswig-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.i7
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());
+ }
}