feat: 增强异常处理
Build Action / Build-LiteLoader (push) Canceled after 0s
Build Action / Build-Shell (push) Canceled after 0s
Build Release / check-version (push) Canceled after 0s
Build Release / Build-LiteLoader (push) Canceled after 0s
Build Release / Build-Shell (push) Canceled after 0s
Build Release / release-napcat (push) Canceled after 0s

This commit is contained in:
手瓜一十雪 committed 2025-04-17 17:48:13 +08:00
1 parent 623188d884
commit d3a34dfdf9
2 files changed
+9 -5

No files matched your search

+2
View File
@@ -42,6 +42,8 @@ export async function NCoreInitFramework(
if (!isExist && path) {
FFmpegService.setFfmpegPath(path);
}
}).catch(e => {
logger.logError('[Ffmpeg] Error:', e);
});
//直到登录成功后,执行下一步
const selfInfo = await new Promise<SelfInfo>((resolveSelfInfo) => {
+7 -5
View File
@@ -222,7 +222,7 @@ async function handleLoginInner(context: { isLogined: boolean }, logger: LogWrap
logger.log(`可用于快速登录的 QQ:\n${historyLoginList
.map((u, index) => `${index + 1}. ${u.uin} ${u.nickName}`)
.join('\n')
}`);
}`);
}
loginService.getQRCodePicture();
try {
@@ -314,10 +314,12 @@ export async function NCoreInitShell() {
const logger = new LogWrapper(pathWrapper.logsPath);
handleUncaughtExceptions(logger);
downloadFFmpegIfNotExists(logger).then(({ path, isExist }) => {
if (!isExist && path) {
FFmpegService.setFfmpegPath(path);
}
});
if (!isExist && path) {
FFmpegService.setFfmpegPath(path);
}
}).catch(e => {
logger.logError('[Ffmpeg] Error:', e);
});
const basicInfoWrapper = new QQBasicInfoWrapper({ logger });
const wrapper = loadQQWrapper(basicInfoWrapper.getFullQQVesion());