1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 23:07:35 +00:00

LibWasm: Give traps a reason and display it when needed

This makes debugging wasm code a bit easier, as we now know what fails
instead of just "too bad, something went wrong".
This commit is contained in:
Ali Mohammad Pur 2021-07-01 17:03:17 +04:30 committed by Ali Mohammad Pur
parent 62ca81fdcc
commit b538e15548
10 changed files with 54 additions and 50 deletions

View file

@ -14,6 +14,7 @@ struct Interpreter {
virtual ~Interpreter() = default;
virtual void interpret(Configuration&) = 0;
virtual bool did_trap() const = 0;
virtual String trap_reason() const = 0;
virtual void clear_trap() = 0;
};