mirror of
https://github.com/kuaifan/dootask.git
synced 2026-10-30 06:20:44 +00:00
fix(manticore): 文档解析抛 Error 时不再杀死文件同步进程
PhpWord 解析带批注引用的 docx 会抛 TypeError,而 TextExtractor::extractFile 只捕获 Exception,导致 manticore:sync-files 被致命错误打死、锁无法释放, 且每次重启都卡在同一批,其后的文件都无法入索引。改为捕获 Throwable, 解析失败按“提取失败”处理,同步继续。
This commit is contained in:
parent
789bf39228
commit
d54dc24cee
@ -258,7 +258,8 @@ class TextExtractor
|
||||
}
|
||||
}
|
||||
return Base::retSuccess("success", $content);
|
||||
} catch (Exception $e) {
|
||||
} catch (\Throwable $e) {
|
||||
// 含 Error:第三方解析库遇到异常文档会抛 TypeError(如 PhpWord 的批注引用),不能让它穿透到调用方
|
||||
return Base::retError($e->getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user