add err parse in get_includes
This commit is contained in:
parent
fdcb7a0cd5
commit
eb7925f588
@ -597,7 +597,13 @@ fn get_includes(path: &PathBuf) -> Vec<crate::core::hdlparam::Include> {
|
||||
let reader = BufReader::new(file);
|
||||
|
||||
for (line_number, line_content) in reader.lines().enumerate() {
|
||||
let line_content = line_content.unwrap();
|
||||
let line_content = match line_content {
|
||||
Ok(content) => content,
|
||||
Err(e) => {
|
||||
println!("line {} has error {}", line_number, e);
|
||||
"".to_string()
|
||||
}
|
||||
};
|
||||
|
||||
if line_content.trim().starts_with("`include") {
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user