| 22 | } |
| 23 | |
| 24 | inline std::optional<ExnRef> Store::Context::take_exception() { |
| 25 | wasmtime_exnref_t exn; |
| 26 | if (wasmtime_context_take_exception(capi(), &exn)) { |
| 27 | return ExnRef(exn); |
| 28 | } |
| 29 | return std::nullopt; |
| 30 | } |
| 31 | |
| 32 | inline bool Store::Context::has_exception() { |
| 33 | return wasmtime_context_has_exception(capi()); |