wasm-trace icon indicating copy to clipboard operation
wasm-trace copied to clipboard

question about usage of unwrap()

Open dataf3l opened this issue 6 years ago • 0 comments

in past projects, I've found uses of unwrap() to be the quick and dirty solution to error propagation, this is great, because you can just "be done with it", however, when it breaks in production it is actually hard to figure out what happened some times, since lots of code investigation has to happen, and no explicit error message is written. the question is, should this unwrap thing become a Result that propagates up the call stack? would that make the program messier?

https://github.com/sarahlim/wasm-trace/blob/796219b38f3b8df167c1d652f196a6365545950c/src/module.rs#L154

dataf3l avatar Sep 08 '19 20:09 dataf3l