Add useful messages when command line preprocessor fails #1526
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.
Error messages before and after the changes
Before
2021-05-05 18:48:39 [INFO] (mdbook::book): Book building has started
thread 'main' panicked at 'nn', src/main.rs:53:5
note: run with
RUST_BACKTRACE=1
environment variable to display a backtrace2021-05-05 18:48:39 [ERROR] (mdbook::utils): Error: The preprocessor exited unsuccessfully
2021-05-05 18:50:53 [INFO] (mdbook::book): Book building has started
2021-05-05 18:50:53 [ERROR] (mdbook::utils): Error: Unable to parse the preprocessed book
2021-05-05 18:50:53 [ERROR] (mdbook::utils): Caused By: expected value at line 1 column 1
After
2021-05-08 12:44:54 [INFO] (mdbook::book): Book building has started
thread 'main' panicked at 'ddd', src/main.rs:50:5
note: run with
RUST_BACKTRACE=1
environment variable to display a backtrace2021-05-08 12:44:54 [ERROR] (mdbook::utils): Error: The "cat" preprocessor exited unsuccessfully with exit code: 101 status
2021-05-05 18:53:36 [INFO] (mdbook::book): Book building has started
2021-05-05 18:53:36 [ERROR] (mdbook::utils): Error: Unable to parse the preprocessed book from "cat" processor
2021-05-05 18:53:36 [ERROR] (mdbook::utils): Caused By: expected value at line 1 column 1