@@ -95,7 +95,7 @@ void install(jsi::Runtime &rt, std::shared_ptr<react::CallInvoker> jsCallInvoker
95
95
}
96
96
if (!args[0 ].isString () || !args[1 ].isString () || !args[2 ].isString ())
97
97
{
98
- jsi::detail::throwJSError (rt, " dbName, databaseToAttach and alias must be a strings" );
98
+ throw jsi::JSError (rt, " dbName, databaseToAttach and alias must be a strings" );
99
99
return {};
100
100
}
101
101
@@ -133,7 +133,7 @@ void install(jsi::Runtime &rt, std::shared_ptr<react::CallInvoker> jsCallInvoker
133
133
}
134
134
if (!args[0 ].isString () || !args[1 ].isString ())
135
135
{
136
- jsi::detail::throwJSError (rt, " dbName, databaseToAttach and alias must be a strings" );
136
+ throw jsi::JSError (rt, " dbName, databaseToAttach and alias must be a strings" );
137
137
return {};
138
138
}
139
139
@@ -288,21 +288,21 @@ void install(jsi::Runtime &rt, std::shared_ptr<react::CallInvoker> jsCallInvoker
288
288
{
289
289
if (sizeof (args) < 3 )
290
290
{
291
- jsi::detail::throwJSError (rt, " [react-native-quick-sqlite][asyncExecuteSqlBatch] Incorrect parameter count" );
291
+ throw jsi::JSError (rt, " [react-native-quick-sqlite][asyncExecuteSqlBatch] Incorrect parameter count" );
292
292
return {};
293
293
}
294
294
295
295
const jsi::Value ¶ms = args[1 ];
296
296
const jsi::Value &callbackHolder = args[2 ];
297
297
if (!callbackHolder.isObject () || !callbackHolder.asObject (rt).isFunction (rt))
298
298
{
299
- jsi::detail::throwJSError (rt, " [react-native-quick-sqlite][asyncExecuteSqlBatch] The callback argument must be a function" );
299
+ throw jsi::JSError (rt, " [react-native-quick-sqlite][asyncExecuteSqlBatch] The callback argument must be a function" );
300
300
return {};
301
301
}
302
302
303
303
if (params.isNull () || params.isUndefined ())
304
304
{
305
- jsi::detail::throwJSError (rt, " [react-native-quick-sqlite][asyncExecuteSqlBatch] - An array of SQL commands or parameters is needed" );
305
+ throw jsi::JSError (rt, " [react-native-quick-sqlite][asyncExecuteSqlBatch] - An array of SQL commands or parameters is needed" );
306
306
return {};
307
307
}
308
308
@@ -377,14 +377,14 @@ void install(jsi::Runtime &rt, std::shared_ptr<react::CallInvoker> jsCallInvoker
377
377
{
378
378
if (sizeof (args) < 3 )
379
379
{
380
- jsi::detail::throwJSError (rt, " [react-native-quick-sqlite][asyncLoadSqlFile] Incorrect parameter count" );
380
+ throw jsi::JSError (rt, " [react-native-quick-sqlite][asyncLoadSqlFile] Incorrect parameter count" );
381
381
return {};
382
382
}
383
383
384
384
const jsi::Value &callbackHolder = args[2 ];
385
385
if (!callbackHolder.isObject () || !callbackHolder.asObject (rt).isFunction (rt))
386
386
{
387
- jsi::detail::throwJSError (rt, " [react-native-quick-sqlite][asyncLoadSqlFile] The callback argument must be a function" );
387
+ throw jsi::JSError (rt, " [react-native-quick-sqlite][asyncLoadSqlFile] The callback argument must be a function" );
388
388
return {};
389
389
}
390
390
@@ -434,14 +434,14 @@ void install(jsi::Runtime &rt, std::shared_ptr<react::CallInvoker> jsCallInvoker
434
434
{
435
435
if (count < 4 )
436
436
{
437
- jsi::detail::throwJSError (rt, " [react-native-quick-sqlite][asyncExecuteSql] Incorrect arguments for asyncExecuteSQL" );
437
+ throw jsi::JSError (rt, " [react-native-quick-sqlite][asyncExecuteSql] Incorrect arguments for asyncExecuteSQL" );
438
438
return {};
439
439
}
440
440
441
441
const jsi::Value &callbackHolder = args[3 ];
442
442
if (!callbackHolder.isObject () || !callbackHolder.asObject (rt).isFunction (rt))
443
443
{
444
- jsi::detail::throwJSError (rt, " [react-native-quick-sqlite][asyncExecuteSql] The callback argument must be a function" );
444
+ throw jsi::JSError (rt, " [react-native-quick-sqlite][asyncExecuteSql] The callback argument must be a function" );
445
445
return {};
446
446
}
447
447
0 commit comments