From 05c7fee39150860d7b9fb2a893ffc4e4f4f8e87d Mon Sep 17 00:00:00 2001 From: Alejandro Duarte Date: Wed, 28 Feb 2024 12:48:46 -0500 Subject: [PATCH] Implement a log error msg --- include/albatross/src/stats/incomplete_gamma.hpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/include/albatross/src/stats/incomplete_gamma.hpp b/include/albatross/src/stats/incomplete_gamma.hpp index eafd5bbc..f8174689 100644 --- a/include/albatross/src/stats/incomplete_gamma.hpp +++ b/include/albatross/src/stats/incomplete_gamma.hpp @@ -35,7 +35,12 @@ constexpr double INCOMPLETE_GAMMA_EQUALITY_TRESHOLD = 1e-12; inline double incomplete_gamma_quadrature_inp_vals(double lb, double ub, std::size_t counter) { - ALBATROSS_ASSERT(counter < gauss_legendre_50_points.size()); + if (counter >= gauss_legendre_50_points.size()) { + std::cout << "ERROR: Counter value " << counter + << " is higher than gauss_legendre_50_points size " + << gauss_legendre_50_points.size() << std::endl; + ALBATROSS_ASSERT(false); + } return (ub - lb) * 0.5 * gauss_legendre_50_points[counter] + 0.5 * (ub + lb); }