Fix simulation_test file load error (#7042)

Co-authored-by: Lucas Kent <rubickent@gmail.com>
This commit is contained in:
Jonathan Tran
2025-05-18 19:28:59 -04:00
committed by GitHub
parent 94b0cc1f3e
commit 57a977e6be

View File

@ -42,7 +42,8 @@ impl Test {
/// Read in the entry point file and return its contents as a string.
pub fn read(&self) -> String {
std::fs::read_to_string(&self.entry_point).expect("Failed to read file: {filename}")
std::fs::read_to_string(&self.entry_point)
.unwrap_or_else(|e| panic!("Failed to read file: {:?} due to {e}", self.entry_point))
}
}