Utilities/wasm: Say something when execution traps

This commit is contained in:
Ali Mohammad Pur 2021-05-14 22:34:35 +04:30 committed by Andreas Kling
parent 84e3957dc3
commit d9ed3b504e
Notes: sideshowbarker 2024-07-18 17:54:27 +09:00

View file

@ -131,6 +131,8 @@ int main(int argc, char* argv[])
}
auto result = machine.invoke(run_address.value(), move(values));
if (result.is_trap())
warnln("Execution trapped!");
if (!result.values().is_empty())
warnln("Returned:");
for (auto& value : result.values()) {