Skip to content

Commit

Permalink
Merge pull request rust-lang#1393 from apatniv/fixing_error
Browse files Browse the repository at this point in the history
Missing chapters Error Reporting: Add file name
  • Loading branch information
ehuss authored Dec 14, 2020
2 parents 45a4810 + ef993e8 commit cf2459f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/book/book.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,9 @@ fn create_missing(src_dir: &Path, summary: &Summary) -> Result<()> {
}
debug!("Creating missing file {}", filename.display());

let mut f = File::create(&filename)?;
let mut f = File::create(&filename).with_context(|| {
format!("Unable to create missing file: {}", filename.display())
})?;
writeln!(f, "# {}", link.name)?;
}
}
Expand Down

0 comments on commit cf2459f

Please sign in to comment.