File tree Expand file tree Collapse file tree 1 file changed +27
-3
lines changed
Expand file tree Collapse file tree 1 file changed +27
-3
lines changed Original file line number Diff line number Diff line change @@ -164,7 +164,13 @@ fn main() {
164164 let technique = match parsing:: parse ( & filename, & content) {
165165 Ok ( document) => document,
166166 Err ( errors) => {
167- for error in errors {
167+ for ( i, error) in errors
168+ . iter ( )
169+ . enumerate ( )
170+ {
171+ if i > 0 {
172+ eprintln ! ( ) ;
173+ }
168174 eprintln ! (
169175 "{}" ,
170176 problem:: full_parsing_error( & error, & filename, & content, & Terminal )
@@ -213,12 +219,23 @@ fn main() {
213219 let technique = match parsing:: parse ( & filename, & content) {
214220 Ok ( document) => document,
215221 Err ( errors) => {
216- for error in errors {
222+ for ( i, error) in errors
223+ . iter ( )
224+ . enumerate ( )
225+ {
226+ if i > 0 {
227+ eprintln ! ( ) ;
228+ }
217229 eprintln ! (
218230 "{}" ,
219231 problem:: concise_parsing_error( & error, & filename, & content, & Terminal )
220232 ) ;
221233 }
234+
235+ eprintln ! (
236+ "\n Unable to parse input file. Try `technique check {}` for details." ,
237+ & filename. to_string_lossy( )
238+ ) ;
222239 std:: process:: exit ( 1 ) ;
223240 }
224241 } ;
@@ -266,7 +283,14 @@ fn main() {
266283 // into the PDF document rather than crashing here. We'll
267284 // see in the future.
268285
269- for error in errors {
286+ for ( i, error) in errors
287+ . iter ( )
288+ . enumerate ( )
289+ {
290+ if i > 0 {
291+ eprintln ! ( ) ;
292+ }
293+
270294 eprintln ! (
271295 "{}" ,
272296 problem:: concise_parsing_error( & error, & filename, & content, & Terminal )
You can’t perform that action at this time.
0 commit comments