Replace throw() with noexcept. Unlike throw(), noexcept indicates that the function does not throw.

Before C++17, throw() was equivalent to wrapping the function in a try {} catch
{ std::unexpected(); }. In C++17 throw() was made equivalent to noexcept and
in C++20 throw() was removed.
This commit is contained in:
Nick Lewycky 2019-08-01 17:13:23 -07:00
parent ac49e57c2d
commit 83aa9c67c7

View File

@ -192,7 +192,7 @@ void module_delete(WasmModule *module) { delete module; }
bool invoke_trampoline(trampoline_t trampoline, void *ctx, void *func, bool invoke_trampoline(trampoline_t trampoline, void *ctx, void *func,
void *params, void *results, WasmTrap::Type *trap_out, void *params, void *results, WasmTrap::Type *trap_out,
box_any_t *user_error, void *invoke_env) throw() { box_any_t *user_error, void *invoke_env) noexcept {
try { try {
trampoline(ctx, func, params, results); trampoline(ctx, func, params, results);
return true; return true;