Improve logs when failing to parse external descriptor #475
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
cargo-make currently panics when failing to parse an external
descriptor. The panic log is quite confusing since it doesn't tell
which file that caused the error.
Log the name of the file that couldn't be parsed. Add a corresponding
error log before the panic call to force a clean exit(1) instead of
panic.
BEFORE:
$ cargo make
[cargo-make] INFO - cargo make 0.32.7
thread 'main' panicked at 'Unable to parse external descriptor,
unexpected character found:
\\
at line 1 column 1',src/lib/descriptor/mod.rs:378:27
note: run with
RUST_BACKTRACE=1
environment variable to display a backtraceAFTER:
$ cargo make
[cargo-make] INFO - cargo make 0.32.7
[cargo-make] ERROR - Unable to parse external file: "./test.toml",
unexpected character found:
\\
at line 1 column 1[cargo-make] WARN - Build Failed.