File tree 1 file changed +16
-6
lines changed 1 file changed +16
-6
lines changed Original file line number Diff line number Diff line change @@ -109,18 +109,28 @@ impl Preprocessor for CmdPreprocessor {
109
109
110
110
self . write_input_to_child ( & mut child, & book, ctx) ;
111
111
112
- let output = child
113
- . wait_with_output ( )
114
- . with_context ( || "Error waiting for the preprocessor to complete" ) ?;
112
+ let output = child. wait_with_output ( ) . with_context ( || {
113
+ format ! (
114
+ "Error waiting for the \" {}\" preprocessor to complete" ,
115
+ self . name
116
+ )
117
+ } ) ?;
115
118
116
119
trace ! ( "{} exited with output: {:?}" , self . cmd, output) ;
117
120
ensure ! (
118
121
output. status. success( ) ,
119
- "The preprocessor exited unsuccessfully"
122
+ format!(
123
+ "The \" {}\" preprocessor exited unsuccessfully with {} status" ,
124
+ self . name, output. status
125
+ )
120
126
) ;
121
127
122
- serde_json:: from_slice ( & output. stdout )
123
- . with_context ( || "Unable to parse the preprocessed book" )
128
+ serde_json:: from_slice ( & output. stdout ) . with_context ( || {
129
+ format ! (
130
+ "Unable to parse the preprocessed book from \" {}\" processor" ,
131
+ self . name
132
+ )
133
+ } )
124
134
}
125
135
126
136
fn supports_renderer ( & self , renderer : & str ) -> bool {
You can’t perform that action at this time.
0 commit comments