Merge pull request #1 from neuschaefer/incl

Include filename in error message when #include fails
This commit is contained in:
Ry 2023-01-20 15:08:05 -08:00 committed by GitHub
commit 2284d0fb11
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -481,7 +481,7 @@ fn include_text_file(line_number: usize, text: &str, input_file: String) -> Stri
} }
} }
let mut included_file = read_to_string(source_path).expect("failed to include file"); let mut included_file = read_to_string(source_path).expect(&format!("failed to include file \"{}\"", path_string));
included_file.push('\n'); included_file.push('\n');
let mut end_of_original_file = String::new(); let mut end_of_original_file = String::new();