修正了种子编译器的错误

This commit is contained in:
TermiNexus committed 2026-07-22 21:55:36 +08:00
1 parent 135aa05485
commit ca7c2120b8
1185 files changed
+12056 -2673

No files matched your search

+5 -1
View File
@@ -458,7 +458,10 @@ class Phase2Translator:
raise
if errors:
_vlog().error(f"\n{len(errors)} 个文件翻译失败,继续编译 includes")
_vlog().error(f"\n{len(errors)} 个文件翻译失败,立即终止编译")
for rel, err in errors:
_vlog().error(f" {rel}: {err}")
raise RuntimeError(f"{len(errors)} 个文件翻译失败,已终止编译")
else:
for idx, (i, src_path, out_path, sha1, msm) in enumerate(need_translate):
rel = os.path.relpath(src_path, self.src_root)
@@ -470,6 +473,7 @@ class Phase2Translator:
except Exception as e:
_vlog().error(f" {rel}: {e}")
traceback.print_exc()
raise RuntimeError(f"翻译 {rel} 失败,已终止编译: {e}") from e
t_end = time.time()
_vlog().info(f" 翻译总耗时: {t_end-t_start:.1f}s")