log error

This commit is contained in:
jusax23 2023-03-08 10:21:14 +01:00
parent fcaa036fff
commit 1b1035bde6
Signed by: jusax23
GPG key ID: 499E2AA870C1CD41

View file

@ -2,7 +2,7 @@ import { BIGINT, BOOL, DB, INT, onAction, SMALLINT, TEXT, TINYINT, VARCHAR } fro
import { oConf } from "./config.js" import { oConf } from "./config.js"
import { PERMISSIONS } from "../server/permissions.js" import { PERMISSIONS } from "../server/permissions.js"
import nMan from "nman"; import nMan from "nman";
import { log, error } from "./log.js"; import { log, error, debug } from "./log.js";
export const db = new DB(); export const db = new DB();
@ -22,6 +22,7 @@ export const connectToDB = async () => {
log("Database", "Connected to Database!"); log("Database", "Connected to Database!");
} catch (e) { } catch (e) {
error("Database", "Error while conncting to Database!"); error("Database", "Error while conncting to Database!");
debug("Database", "Error:", e);
throw e; throw e;
} }
}; };