refactor: change error report format from table to code blocks
Display error messages as separate sections with code blocks instead of table rows. This improves readability for long error messages that would overflow in table cells. Co-Authored-By: Claude (glm-5) <noreply@anthropic.com>
This commit is contained in:
@@ -597,10 +597,12 @@ class DiscreteMaterialPlanCleaner:
|
|||||||
if self.stats["errors"]:
|
if self.stats["errors"]:
|
||||||
report_lines.append("## 错误明细")
|
report_lines.append("## 错误明细")
|
||||||
report_lines.append("")
|
report_lines.append("")
|
||||||
report_lines.append("| 订单号 | 错误信息 |")
|
|
||||||
report_lines.append("|--------|----------|")
|
|
||||||
for item in self.stats["errors"]:
|
for item in self.stats["errors"]:
|
||||||
report_lines.append(f"| {item['order_id']} | {item['error_message']} |")
|
report_lines.append(f"### 订单号: `{item['order_id']}`")
|
||||||
|
report_lines.append("")
|
||||||
|
report_lines.append("```")
|
||||||
|
report_lines.append(item['error_message'])
|
||||||
|
report_lines.append("```")
|
||||||
report_lines.append("")
|
report_lines.append("")
|
||||||
|
|
||||||
return "\n".join(report_lines)
|
return "\n".join(report_lines)
|
||||||
|
|||||||
Reference in New Issue
Block a user