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 13, 2020
1 parent 5842d3e commit f3c3a30
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 f3c3a30

Please sign in to comment.