AssemblyScript also has an abort func (currently set to no-op in the test module), it is called on panic
Note: Rust's catch_unwind does not seem to work either and probably gets ignored by either the wasm compiler (or wasmer runtime) - I tried in the lens code, and these guys had the same issue https://stackoverflow.com/questions/59426545/rust-paniccatch-unwind-no-use-in-webassembly - any error handling we do will probably not be able to handle these until the error handling proposal is implemented in our runtime
Discussed over discord - we'll change the message format to the following:
[type-byte][len][message]
where type-byte is a single i8, negative values represent an error, positive values a json result, 0 is undefined. For now all that we will care about is whether it is positive, negative or 0, but in the future we may have further use for these.
We need to improve this soon.
Handy links: https://github.com/WebAssembly/exception-handling/blob/main/proposals/exception-handling/Exceptions.md https://github.com/WebAssembly/exception-handling https://webassembly.org/roadmap/ (wasmtime and wasmer dont support the wasm proposal) https://emscripten.org/docs/porting/exceptions.html
AssemblyScript also has an abort func (currently set to no-op in the test module), it is called on panic
Note: Rust's catch_unwind does not seem to work either and probably gets ignored by either the wasm compiler (or wasmer runtime) - I tried in the lens code, and these guys had the same issue https://stackoverflow.com/questions/59426545/rust-paniccatch-unwind-no-use-in-webassembly - any error handling we do will probably not be able to handle these until the error handling proposal is implemented in our runtime
Discussed over discord - we'll change the message format to the following:
[type-byte][len][message]
where type-byte is a single i8, negative values represent an error, positive values a json result, 0 is undefined. For now all that we will care about is whether it is positive, negative or 0, but in the future we may have further use for these.