Skip to content

Commit

Permalink
Print backtraces for errors
Browse files Browse the repository at this point in the history
  • Loading branch information
jyn514 committed Jul 11, 2020
1 parent 6552338 commit a6b64ca
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions collector/src/bin/rustc-perf-collector/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,8 @@ fn get_benchmarks(
exclude: Option<&str>,
) -> anyhow::Result<Vec<Benchmark>> {
let mut benchmarks = Vec::new();
'outer: for entry in fs::read_dir(benchmark_dir).context("failed to list benchmarks")? {
'outer: for entry in fs::read_dir(benchmark_dir)
.with_context(|| format!("failed to list benchmark dir {}", benchmark_dir.display()))? {
let entry = entry?;
let path = entry.path();
let name = match entry.file_name().into_string() {
Expand Down Expand Up @@ -383,7 +384,7 @@ fn main() {
match main_result() {
Ok(code) => process::exit(code),
Err(err) => {
eprintln!("{:#}", err);
eprintln!("{:#}\n{}", err, err.backtrace());
process::exit(1);
}
}
Expand Down

0 comments on commit a6b64ca

Please sign in to comment.