Skip to content

Commit a083d6a

Browse files
Keenan GugelerRiolku
authored andcommitted
replace std::assert with KU_ASSERT
This also enables a parameter RUNTIME_CHECKS that can be passed to the Makefile to force these checks to be on. This also enables a CI check to make sure we consistently use KU_ASSERT and not std::assert. Closes #2283.
1 parent 5edc48f commit a083d6a

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src_cpp/node_util.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,8 +167,8 @@ std::unordered_map<std::string, std::shared_ptr<Value>> Util::TransformParameter
167167
std::unordered_map<std::string, std::shared_ptr<Value>> result;
168168
for (size_t i = 0; i < params.Length(); i++) {
169169
auto param = params.Get(i).As<Napi::Array>();
170-
assert(param.Length() == 2);
171-
assert(param.Get(uint32_t(0)).IsString());
170+
KU_ASSERT(param.Length() == 2);
171+
KU_ASSERT(param.Get(uint32_t(0)).IsString());
172172
auto key = param.Get(uint32_t(0)).ToString().Utf8Value();
173173
if (!parameterMap.count(key)) {
174174
throw Exception("Parameter " + key + " is not defined in the prepared statement");

0 commit comments

Comments
 (0)