feat: 异常处理与log4js替换

This commit is contained in:
手瓜一十雪 committed 2024-11-13 12:26:23 +08:00
1 parent 4f89f184b8
commit 3e1f566699
4 files changed
+68 -57

No files matched your search

+8
View File
@@ -23,6 +23,14 @@ export async function NCoreInitFramework(
) {
//在进入本层前是否登录未进行判断
console.log('NapCat Framework App Loading...');
process.on('uncaughtException', (err) => {
console.log('[NapCat] [Error] Unhandled Exception:', err.message);
});
process.on('unhandledRejection', (reason, promise) => {
console.log('[NapCat] [Error] unhandledRejection:', reason);
});
const pathWrapper = new NapCatPathWrapper();
const logger = new LogWrapper(pathWrapper.logsPath);
const basicInfoWrapper = new QQBasicInfoWrapper({ logger });