Skip to content

Commit

Permalink
Printing actual exception in require base set (#1816)
Browse files Browse the repository at this point in the history
Authors:
  - Corey J. Nolet (https://github.com/cjnolet)
  - AJ Schmidt (https://github.com/ajschmidt8)

Approvers:
  - Divye Gala (https://github.com/divyegala)

URL: #1816
cjnolet authored Sep 12, 2023
1 parent c38b19f commit 28b7894
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions cpp/bench/ann/src/common/benchmark.hpp
Original file line number Diff line number Diff line change
@@ -211,9 +211,10 @@ void bench_search(::benchmark::State& state,
try {
algo->set_search_dataset(dataset->base_set(algo_property.dataset_memory_type),
dataset->base_set_size());
} catch (const std::exception&) {
} catch (const std::exception& ex) {
state.SkipWithError("The algorithm '" + index.name +
"' requires the base set, but it's not available.");
"' requires the base set, but it's not available. " +
"Exception: " + std::string(ex.what()));
return;
}
}

0 comments on commit 28b7894

Please sign in to comment.