Unverified Commit 1c369052 by Enkelmann Committed by GitHub

better error message on write error (#195)

parent 528749a5
......@@ -189,7 +189,9 @@ pub fn print_all_messages(
+ "\n"
};
if let Some(file_path) = out_path {
std::fs::write(file_path, output).unwrap();
std::fs::write(file_path, output).unwrap_or_else(|error| {
panic!("Writing to output path {} failed: {}", file_path, error)
});
} else {
print!("{}", output);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment