Skip to content

Commit 0897443

Browse files
authored
Merge pull request #1354 from joshlf/master. r=emilio
Improve error message when libclang fails
2 parents d61ab75 + 422acf6 commit 0897443

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/ir/context.rs

+6-1
Original file line numberDiff line numberDiff line change
@@ -562,7 +562,12 @@ impl BindgenContext {
562562
&clang_args,
563563
&options.input_unsaved_files,
564564
parse_options,
565-
).expect("TranslationUnit::parse failed")
565+
).expect("libclang error; possible causes include:
566+
- Invalid flag syntax
567+
- Unrecognized flags
568+
- Invalid flag arguments
569+
- File I/O errors
570+
If you encounter an error missing from this list, please file an issue or a PR!")
566571
};
567572

568573
let target_info = clang::TargetInfo::new(&translation_unit);

0 commit comments

Comments
 (0)