mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2025-07-19 12:03:37 +00:00
feat: 增强异常处理
This commit is contained in:
@@ -42,6 +42,8 @@ export async function NCoreInitFramework(
|
|||||||
if (!isExist && path) {
|
if (!isExist && path) {
|
||||||
FFmpegService.setFfmpegPath(path);
|
FFmpegService.setFfmpegPath(path);
|
||||||
}
|
}
|
||||||
|
}).catch(e => {
|
||||||
|
logger.logError('[Ffmpeg] Error:', e);
|
||||||
});
|
});
|
||||||
//直到登录成功后,执行下一步
|
//直到登录成功后,执行下一步
|
||||||
const selfInfo = await new Promise<SelfInfo>((resolveSelfInfo) => {
|
const selfInfo = await new Promise<SelfInfo>((resolveSelfInfo) => {
|
||||||
|
@@ -222,7 +222,7 @@ async function handleLoginInner(context: { isLogined: boolean }, logger: LogWrap
|
|||||||
logger.log(`可用于快速登录的 QQ:\n${historyLoginList
|
logger.log(`可用于快速登录的 QQ:\n${historyLoginList
|
||||||
.map((u, index) => `${index + 1}. ${u.uin} ${u.nickName}`)
|
.map((u, index) => `${index + 1}. ${u.uin} ${u.nickName}`)
|
||||||
.join('\n')
|
.join('\n')
|
||||||
}`);
|
}`);
|
||||||
}
|
}
|
||||||
loginService.getQRCodePicture();
|
loginService.getQRCodePicture();
|
||||||
try {
|
try {
|
||||||
@@ -314,10 +314,12 @@ export async function NCoreInitShell() {
|
|||||||
const logger = new LogWrapper(pathWrapper.logsPath);
|
const logger = new LogWrapper(pathWrapper.logsPath);
|
||||||
handleUncaughtExceptions(logger);
|
handleUncaughtExceptions(logger);
|
||||||
downloadFFmpegIfNotExists(logger).then(({ path, isExist }) => {
|
downloadFFmpegIfNotExists(logger).then(({ path, isExist }) => {
|
||||||
if (!isExist && path) {
|
if (!isExist && path) {
|
||||||
FFmpegService.setFfmpegPath(path);
|
FFmpegService.setFfmpegPath(path);
|
||||||
}
|
}
|
||||||
});
|
}).catch(e => {
|
||||||
|
logger.logError('[Ffmpeg] Error:', e);
|
||||||
|
});
|
||||||
const basicInfoWrapper = new QQBasicInfoWrapper({ logger });
|
const basicInfoWrapper = new QQBasicInfoWrapper({ logger });
|
||||||
const wrapper = loadQQWrapper(basicInfoWrapper.getFullQQVesion());
|
const wrapper = loadQQWrapper(basicInfoWrapper.getFullQQVesion());
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user