nus-vv-streams / vvtk

A toolkit for volumetric video research
MIT License
9 stars 8 forks source link

Need better error handling when commands are not invoked in the expected way #25

Closed weitsang closed 1 year ago

weitsang commented 1 year ago

For instance,

vv write

cause the following:

thread 'main' panicked at '`write` needs to consume an input, but no named input is found, specify it using `+input=input_name`', src/pipeline/executor.rs:87:13
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

The error message should guide the users in how to invoke the command correctly and ask users to run --help for details.

YoHoSo commented 1 year ago

Now, some of the panics are removed and replaced with an error message. For instance,

vv write

The output:

Error: `write` needs to consume an input, but no named input is found, specify it using `+input=input_name`
Use --help for more information