Skip to content

Commit 33ad8c2

Browse files
author
Oscar Franco
committed
Throw error when incorrect number of args is passed to asyncExecuteSQL call
1 parent 46aeb26 commit 33ad8c2

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

cpp/installer.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -405,8 +405,10 @@ void install(jsi::Runtime &rt, std::shared_ptr<react::CallInvoker> jsCallInvoker
405405
{
406406
if (count < 4)
407407
{
408-
LOGW("NOT ENOUGH PARAMS PASSED");
408+
jsi::detail::throwJSError(rt, "[react-native-quick-sqlite] Incorrect arguments for asyncExecuteSQL");
409+
return {};
409410
}
411+
410412
const string dbName = args[0].asString(rt).utf8(rt);
411413
const string query = args[1].asString(rt).utf8(rt);
412414
const jsi::Value &originalParams = args[2];

0 commit comments

Comments
 (0)