| 165 | } |
| 166 | |
| 167 | std::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 | |
| 178 | chaiscript::exception::eval_error get_eval_error(const std::function<void ()> &f) |
| 179 | { |