Improved file reload error message (#6274)

This commit is contained in:
Santiago Vrancovich 2023-03-14 13:43:21 -03:00 committed by GitHub
parent 3a4c3598d1
commit ad855da12d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -776,7 +776,7 @@ pub fn reload(
let path = self
.path()
.filter(|path| path.exists())
.ok_or_else(|| anyhow!("can't find file to reload from"))?
.ok_or_else(|| anyhow!("can't find file to reload from {:?}", self.display_name()))?
.to_owned();
let mut file = std::fs::File::open(&path)?;