wizer icon indicating copy to clipboard operation
wizer copied to clipboard

Support suppressing wasm backtrace output on non-zero exit code

Open tschneidereit opened this issue 4 years ago • 4 comments
trafficstars

When using Wizer as part of a build process, it's not always desirable to have the Wasm backtrace dumped if the guest code didn't exit successfully.

Would anything speak against adding a "silent" mode, where Wizer just forwards the exit code, but doesn't otherwise print anything itself?

tschneidereit avatar Aug 27 '21 15:08 tschneidereit

Do you mean for the CLI or the library?

fitzgen avatar Aug 30 '21 17:08 fitzgen

Both, ideally, though for my immediate need the CLI would be more important.

tschneidereit avatar Aug 30 '21 18:08 tschneidereit

For the library, it is up to the caller: either print the full error chain (which includes the wasm trap) or don't when you get an error from Wizer.

For the CLI, we can add a --quiet mode that makes the CLI do that.

fitzgen avatar Aug 30 '21 18:08 fitzgen

Oh, of course, I can just change the error handling in the embedding, good point :)

A --quiet mode for the CLI sounds great, though!

tschneidereit avatar Aug 31 '21 09:08 tschneidereit