From 9bf7bf1b472f4e6da5145f4168b9ff85867903c7 Mon Sep 17 00:00:00 2001 From: Ezekiel Warren Date: Thu, 7 Nov 2024 17:30:04 -0800 Subject: [PATCH] chore: add exceptiont to segfault handler --- ecsact/wasm/detail/emscripten_debug.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ecsact/wasm/detail/emscripten_debug.cc b/ecsact/wasm/detail/emscripten_debug.cc index 4d2f25c..687000a 100644 --- a/ecsact/wasm/detail/emscripten_debug.cc +++ b/ecsact/wasm/detail/emscripten_debug.cc @@ -1,15 +1,16 @@ #include "ecsact/wasm/detail/emscripten_debug.hh" +#include auto ecsact::wasm::detail::emscripten_debug_segfault( const wasm_val_vec_t* args, wasm_val_vec_t* results ) -> wasm_trap_t* { - return nullptr; + throw std::logic_error{"segfault"}; } auto ecsact::wasm::detail::emscripten_debug_alignfault( const wasm_val_vec_t* args, wasm_val_vec_t* results ) -> wasm_trap_t* { - return nullptr; + throw std::logic_error{"alignfault"}; }