aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/cxx.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/cxx.cc b/src/cxx.cc
index 4b0fd2e9..d3a87c0c 100644
--- a/src/cxx.cc
+++ b/src/cxx.cc
@@ -537,11 +537,16 @@ class Fail final {
public:
Fail(repr::PtrLen &throw$) : throw$(throw$) {}
void operator()(const char *) noexcept;
+ void operator()(const std::string &) noexcept;
};
void Fail::operator()(const char *catch$) noexcept {
throw$ = cxxbridge1$exception(catch$, std::strlen(catch$));
}
+
+void Fail::operator()(const std::string &catch$) noexcept {
+ throw$ = cxxbridge1$exception(catch$.data(), catch$.length());
+}
} // namespace detail
} // namespace cxxbridge1