Skip to content

Commit 7580b86

Browse files
committed
Print profiling information even if there is an error
1 parent d75f4fb commit 7580b86

1 file changed

Lines changed: 8 additions & 6 deletions

File tree

splashsurf/src/main.rs

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ fn run_splashsurf() -> Result<(), anyhow::Error> {
108108
let args = ReconstructionRunnerArgs::try_from(&cmd_args)
109109
.context("Failed processing parameters from command line")?;
110110

111-
if cmd_args.parallelize_over_files {
111+
let result = if cmd_args.parallelize_over_files {
112112
paths.par_iter().try_for_each(|path| {
113113
reconstruction::entry_point(path, &args)
114114
.with_context(|| {
@@ -122,21 +122,23 @@ fn run_splashsurf() -> Result<(), anyhow::Error> {
122122
log_error(&err);
123123
err
124124
})
125-
})?;
125+
})
126126
} else {
127127
paths
128128
.iter()
129-
.try_for_each(|path| reconstruction::entry_point(path, &args))?;
130-
}
129+
.try_for_each(|path| reconstruction::entry_point(path, &args))
130+
};
131131

132-
info!("Finished processing all inputs.");
132+
if result.is_ok() {
133+
info!("Successfully finished processing all inputs.");
134+
}
133135

134136
coarse_prof_write_string()?
135137
.split("\n")
136138
.filter(|l| l.len() > 0)
137139
.for_each(|l| info!("{}", l));
138140

139-
Ok(())
141+
result
140142
}
141143

142144
fn main() -> Result<(), anyhow::Error> {

0 commit comments

Comments
 (0)