wrap-cli
wrap-cli copied to clipboard
Client: Throw Less Errors
In the JS client + core libraries, we throw errors. This is a hard error handling method to develop against, because you do not know what functions will throw and which will not. Treating all functions as "throwable" is not very realistic.
Instead we can adopt a better strategy, return wrapped result + error objects (aka Result<T>).
This is a well known development practice that we use in all of our wasm languages.