From 28b789404bedfa8dd82675fc4221f6db927c0422 Mon Sep 17 00:00:00 2001 From: "Corey J. Nolet" Date: Mon, 11 Sep 2023 21:03:32 -0400 Subject: [PATCH] Printing actual exception in `require base set` (#1816) Authors: - Corey J. Nolet (https://github.com/cjnolet) - AJ Schmidt (https://github.com/ajschmidt8) Approvers: - Divye Gala (https://github.com/divyegala) URL: https://github.com/rapidsai/raft/pull/1816 --- cpp/bench/ann/src/common/benchmark.hpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cpp/bench/ann/src/common/benchmark.hpp b/cpp/bench/ann/src/common/benchmark.hpp index 4e91ee0690..4ec977700d 100644 --- a/cpp/bench/ann/src/common/benchmark.hpp +++ b/cpp/bench/ann/src/common/benchmark.hpp @@ -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; } }