mirror of
https://github.com/darksaid98/oxmysql.git
synced 2026-12-02 06:28:54 +00:00
fix: rename printError function
This apparently conflicts with and overrides a global used in cfx's JS runtime.
This commit is contained in:
1 parent
8daa2b7e63
commit
86aaf157fa
4 files changed
+9
-9
No files matched your search
@@ -1,5 +1,5 @@
|
||||
import { pool } from '.';
|
||||
import { printError, profileBatchStatements, runProfiler } from '../logger';
|
||||
import { logError, profileBatchStatements, runProfiler } from '../logger';
|
||||
import { CFXCallback, CFXParameters, QueryType } from '../types';
|
||||
import { parseResponse } from '../utils/parseResponse';
|
||||
import { executeType, parseExecute } from '../utils/parseExecute';
|
||||
@@ -25,7 +25,7 @@ export const rawExecute = async (
|
||||
placeholders = query.split('?').length - 1;
|
||||
parameters = parseExecute(placeholders, parameters);
|
||||
} catch (err: any) {
|
||||
return printError(invokingResource, cb, isPromise, query, err.message);
|
||||
return logError(invokingResource, cb, isPromise, query, err.message);
|
||||
}
|
||||
|
||||
if (!isServerConnected) await waitForConnection();
|
||||
@@ -84,7 +84,7 @@ export const rawExecute = async (
|
||||
}
|
||||
}
|
||||
} catch (err: any) {
|
||||
printError(invokingResource, cb, isPromise, `Query: ${query}`, err.message);
|
||||
logError(invokingResource, cb, isPromise, `Query: ${query}`, err.message);
|
||||
|
||||
TriggerEvent('oxmysql:error', {
|
||||
query: query,
|
||||
|
||||
@@ -2,7 +2,7 @@ import { pool, isServerConnected, waitForConnection } from '.';
|
||||
import { parseArguments } from '../utils/parseArguments';
|
||||
import { setCallback } from '../utils/setCallback';
|
||||
import { parseResponse } from '../utils/parseResponse';
|
||||
import { logQuery, printError, runProfiler } from '../logger';
|
||||
import { logQuery, logError, runProfiler } from '../logger';
|
||||
import type { CFXCallback, CFXParameters } from '../types';
|
||||
import type { QueryType } from '../types';
|
||||
import { scheduleTick } from '../utils/scheduleTick';
|
||||
@@ -20,7 +20,7 @@ export const rawQuery = async (
|
||||
try {
|
||||
[query, parameters] = parseArguments(query, parameters);
|
||||
} catch (err: any) {
|
||||
return printError(invokingResource, cb, isPromise, `Query: ${query}`, err.message);
|
||||
return logError(invokingResource, cb, isPromise, `Query: ${query}`, err.message);
|
||||
}
|
||||
|
||||
if (!isServerConnected) await waitForConnection();
|
||||
@@ -51,7 +51,7 @@ export const rawQuery = async (
|
||||
}
|
||||
}
|
||||
} catch (err: any) {
|
||||
printError(invokingResource, cb, isPromise, `Query: ${query}`, JSON.stringify(parameters), err.message);
|
||||
logError(invokingResource, cb, isPromise, `Query: ${query}`, JSON.stringify(parameters), err.message);
|
||||
|
||||
TriggerEvent('oxmysql:error', {
|
||||
query: query,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { pool, isServerConnected, waitForConnection } from '.';
|
||||
import { printError, profileBatchStatements, runProfiler } from '../logger';
|
||||
import { logError, profileBatchStatements, runProfiler } from '../logger';
|
||||
import { CFXCallback, CFXParameters, TransactionQuery } from '../types';
|
||||
import { parseTransaction } from '../utils/parseTransaction';
|
||||
import { scheduleTick } from '../utils/scheduleTick';
|
||||
@@ -24,7 +24,7 @@ export const rawTransaction = async (
|
||||
try {
|
||||
transactions = parseTransaction(queries, parameters);
|
||||
} catch (err: any) {
|
||||
return printError(invokingResource, cb, isPromise, err.message);
|
||||
return logError(invokingResource, cb, isPromise, err.message);
|
||||
}
|
||||
|
||||
if (!isServerConnected) await waitForConnection();
|
||||
|
||||
Reference in new issue
Block a user