From dd3f2bed20a9f3889d9ea5d3297c0dd58aae56bf Mon Sep 17 00:00:00 2001 From: Metin Cakircali Date: Tue, 21 Nov 2023 13:23:29 +0100 Subject: [PATCH] add detail to assert msg --- src/metkit/mars/TypeToByListFloat.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/metkit/mars/TypeToByListFloat.cc b/src/metkit/mars/TypeToByListFloat.cc index b7eedd2..3450cb0 100644 --- a/src/metkit/mars/TypeToByListFloat.cc +++ b/src/metkit/mars/TypeToByListFloat.cc @@ -61,8 +61,9 @@ void TypeToByListFloat::expand(const MarsExpandContext& ctx, std::vector 0, name_ + ": 'by' value must be a positive number"); + ASSERT_MSG(from <= to, name_ + ": [" + std::to_string(from) + "] value must be less than [" + + std::to_string(to) + "] value!"); + ASSERT_MSG(by > 0, name_ + ": [" + std::to_string(by) + "] value must be a positive number!"); for (float j = from + by; j <= to; j += by) { newval.push_back(l2s(j)); }