MCPcopy Create free account
hub / github.com/ChaiScript/ChaiScript / throws_exception

Function throws_exception

src/main.cpp:167–176  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

165}
166
167std::string throws_exception(const std::function<void ()> &f)
168{
169 try {
170 f();
171 } catch (const std::exception &e) {
172 return e.what();
173 }
174
175 return "";
176}
177
178chaiscript::exception::eval_error get_eval_error(const std::function<void ()> &f)
179{

Callers

nothing calls this directly

Calls 2

fFunction · 0.50
whatMethod · 0.45

Tested by

no test coverage detected