Skip to content

Commit

Permalink
chore: add exceptiont to segfault handler
Browse files Browse the repository at this point in the history
  • Loading branch information
zaucy committed Nov 8, 2024
1 parent ead1c60 commit 9bf7bf1
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions ecsact/wasm/detail/emscripten_debug.cc
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
#include "ecsact/wasm/detail/emscripten_debug.hh"
#include <stdexcept>

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"};
}

0 comments on commit 9bf7bf1

Please sign in to comment.