Print helpful error on deserialization error
jfrimmel opened this issue · 0 comments
jfrimmel commented
There are some users reporting errors on "malformed" (i.e. in the sense of: unknown format) input, e.g. #32. Currently (version 2.0.0
) the tool panics:
$ cargo valgrind run
Finished dev [unoptimized + debuginfo] target(s) in 0.01s
Running `/home/jfrimmel/.cargo/bin/cargo-valgrind target/debug/ffi-bug`
Test
thread 'main' panicked at 'Cannot parse valgrind output: Error(Custom("missing field `xwhat`"), State { next_error: None })', src/main.rs:69:49
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
This is really unfortunate. This error should be handled gracefully, as it was done in the 1.x
version. But instead of only writing, that there is an error, a more helpful output would be:
$ cargo valgrind run
Finished dev [unoptimized + debuginfo] target(s) in 0.01s
Running `/home/jfrimmel/.cargo/bin/cargo-valgrind target/debug/ffi-bug`
Test
Internal error in `cargo valgrind`: encountered an unknown valgrind output.
Below you'll find the output of valgrind. It would be appreciated, if you create a bug-report using this output at
https://github.com/jfrimmel/cargo-valgrind/issues/new