mirror of
https://github.com/darksaid98/oxmysql.git
synced 2026-12-02 14:38:50 +00:00
refactor: safeCallback provides a warning, rather than an error
- The query does in fact proceed, but does not send a result
This commit is contained in:
1 parent
be221b70d3
commit
5e6547611b
1 file changed
+1
-1
+1
-1
@@ -11,7 +11,7 @@ setImmediate(async () => {
|
||||
|
||||
const safeCallback = (callback, result, error) => {
|
||||
if (typeof callback === 'function') return callback(result || false);
|
||||
else return console.log(`^1[ERROR] ${error[0]} was unable to execute a query, callback function was undefined!\n ^1 ${error[1]}^0`);
|
||||
else return console.log(`^3[WARNING] ${error[0]} executed a query, but no callback function was defined!\n ^3 ${error[1]}^0`);
|
||||
};
|
||||
|
||||
global.exports('execute', (query, parameters, cb, resource = GetInvokingResource()) => {
|
||||
|
||||
Reference in new issue
Block a user