Skip to content

Commit

Permalink
add detail to assert msg
Browse files Browse the repository at this point in the history
  • Loading branch information
mcakircali committed Nov 21, 2023
1 parent 82f33a9 commit dd3f2be
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/metkit/mars/TypeToByListFloat.cc
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,9 @@ void TypeToByListFloat::expand(const MarsExpandContext& ctx, std::vector<std::st
i += 2;
}

ASSERT_MSG(from <= to, name_ + ": 'from' value must be less than 'to' value");
ASSERT_MSG(by > 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));
}
Expand Down

0 comments on commit dd3f2be

Please sign in to comment.