From 2fd454065f96486046dbf8f4d4b59ca43d6cd2f6 Mon Sep 17 00:00:00 2001 From: Allison Vacanti Date: Fri, 24 Aug 2018 13:14:13 -0400 Subject: [PATCH] Catch exceptions and continue during benchmarking. --- benchmarking/Benchmarker.h | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/benchmarking/Benchmarker.h b/benchmarking/Benchmarker.h index 4b181210f..3532f1ee1 100644 --- a/benchmarking/Benchmarker.h +++ b/benchmarking/Benchmarker.h @@ -319,7 +319,16 @@ public: { std::cout << "*** " << vtkm::testing::TypeName::Name() << " ***************" << std::endl; Benchmarker bench; - bench(Maker(t)); + try + { + bench(Maker(t)); + } + catch (std::exception& e) + { + std::cout << "\n" + << "An exception occuring during a benchmark:\n\t" << e.what() << "\n" + << "Attempting to continue with remaining benchmarks...\n\n"; + } } };