Proper error handling for the exporter

This commit is contained in:
sharkdp authored and David Peter committed 2018-03-20 21:40:06 +01:00
1 parent 9b5dd60a92
commit 1bd5436109
2 files changed
+8 -9

No files matched your search

+7 -1
View File
@@ -207,7 +207,13 @@ fn main() {
match res {
Ok(timing_results) => {
export_manager.write_results(timing_results).unwrap();
let ans = export_manager.write_results(timing_results);
if let Err(e) = ans {
error(&format!(
"The following error occured while exporting: {}",
e.description()
));
}
}
Err(e) => error(e.description()),
}