[{"data":1,"prerenderedAt":198},["ShallowReactive",2],{"content-/blog/error-handling":3,"related-blog":173},{"_path":4,"_dir":5,"_draft":6,"_partial":6,"_locale":7,"title":8,"description":9,"keywords":10,"author":11,"date":12,"category":13,"image":14,"body":15,"_type":167,"_id":168,"_source":169,"_file":170,"_stem":171,"_extension":172},"/blog/error-handling","blog",false,"","错误处理机制","多智能体系统中的错误检测、恢复和容错机制","错误处理机制, Blog, HTMLPAGE","HTMLPAGE","2025-11-26","待分类","/content-images/blog/blog.jpg",{"type":16,"children":17,"toc":157},"root",[18,26,32,47,52,60,65,73,78,83,89,117,122,153],{"type":19,"tag":20,"props":21,"children":22},"element","p",{},[23],{"type":24,"value":25},"text","错误处理是设计健壮系统的重要环节，既要防止未捕获异常崩溃，也要为用户提供有意义的反馈。",{"type":19,"tag":27,"props":28,"children":30},"h3",{"id":29},"原则",[31],{"type":24,"value":29},{"type":19,"tag":33,"props":34,"children":35},"ul",{},[36,42],{"type":19,"tag":37,"props":38,"children":39},"li",{},[40],{"type":24,"value":41},"早捕获、早处理：在边界处捕获错误，并把可恢复的逻辑与不可恢复的逻辑区分开。",{"type":19,"tag":37,"props":43,"children":44},{},[45],{"type":24,"value":46},"记录上下文：日志应包含 trace id、用户信息与堆栈，以便后续定位。",{"type":19,"tag":27,"props":48,"children":50},{"id":49},"前端策略",[51],{"type":24,"value":49},{"type":19,"tag":33,"props":53,"children":54},{},[55],{"type":19,"tag":37,"props":56,"children":57},{},[58],{"type":24,"value":59},"捕获未处理异常并向后端上报，同时给用户提供友好的错误提示与重试选项。",{"type":19,"tag":27,"props":61,"children":63},{"id":62},"后端策略",[64],{"type":24,"value":62},{"type":19,"tag":33,"props":66,"children":67},{},[68],{"type":19,"tag":37,"props":69,"children":70},{},[71],{"type":24,"value":72},"采用断路器、重试与退避策略处理外部服务故障；使用死信队列保存无法处理的消息。",{"type":19,"tag":27,"props":74,"children":76},{"id":75},"结论",[77],{"type":24,"value":75},{"type":19,"tag":20,"props":79,"children":80},{},[81],{"type":24,"value":82},"错误处理是工程设计的一部分，结合监控、告警与自动化补救措施，能显著提升系统可靠性与恢复能力。",{"type":19,"tag":84,"props":85,"children":87},"h2",{"id":86},"初步纲要",[88],{"type":24,"value":86},{"type":19,"tag":33,"props":90,"children":91},{},[92,97,102,107,112],{"type":19,"tag":37,"props":93,"children":94},{},[95],{"type":24,"value":96},"主题简介",{"type":19,"tag":37,"props":98,"children":99},{},[100],{"type":24,"value":101},"背景与动机",{"type":19,"tag":37,"props":103,"children":104},{},[105],{"type":24,"value":106},"核心概念",{"type":19,"tag":37,"props":108,"children":109},{},[110],{"type":24,"value":111},"实践案例",{"type":19,"tag":37,"props":113,"children":114},{},[115],{"type":24,"value":116},"进一步扩展",{"type":19,"tag":84,"props":118,"children":120},{"id":119},"相关链接",[121],{"type":24,"value":119},{"type":19,"tag":33,"props":123,"children":124},{},[125,135,144],{"type":19,"tag":37,"props":126,"children":127},{},[128],{"type":19,"tag":129,"props":130,"children":132},"a",{"href":131},"/blog",[133],{"type":24,"value":134},"返回博客分类",{"type":19,"tag":37,"props":136,"children":137},{},[138],{"type":19,"tag":129,"props":139,"children":141},{"href":140},"/blog/topic/multi-agent-system",[142],{"type":24,"value":143},"查看热门话题",{"type":19,"tag":37,"props":145,"children":146},{},[147],{"type":19,"tag":129,"props":148,"children":150},{"href":149},"/blog/ai-architecture-deep-dive",[151],{"type":24,"value":152},"AI 架构深入",{"type":19,"tag":154,"props":155,"children":156},"hr",{},[],{"title":7,"searchDepth":158,"depth":158,"links":159},3,[160,161,162,163,164,166],{"id":29,"depth":158,"text":29},{"id":49,"depth":158,"text":49},{"id":62,"depth":158,"text":62},{"id":75,"depth":158,"text":75},{"id":86,"depth":165,"text":86},2,{"id":119,"depth":165,"text":119},"markdown","content:blog:error-handling.md","content","blog/error-handling.md","blog/error-handling","md",[174,182,190],{"_path":175,"_dir":5,"_draft":6,"_partial":6,"_locale":7,"title":176,"description":177,"keywords":178,"author":11,"date":12,"category":13,"image":14,"_type":167,"_id":179,"_source":169,"_file":180,"_stem":181,"_extension":172},"/blog/2025-q1-updates","2025 Q1 产品更新","第一季度重大功能发布：AI 生成优化、新模板上线、编辑器增强等","2025 Q1 产品更新, Blog, HTMLPAGE","content:blog:2025-q1-updates.md","blog/2025-q1-updates.md","blog/2025-q1-updates",{"_path":183,"_dir":5,"_draft":6,"_partial":6,"_locale":7,"title":184,"description":185,"keywords":186,"author":11,"date":12,"category":13,"image":14,"_type":167,"_id":187,"_source":169,"_file":188,"_stem":189,"_extension":172},"/blog/2025-roadmap","2025 产品路线图","展望 2025 年的产品规划：AI 能力增强、模板扩充、国际化等","2025 产品路线图, Blog, HTMLPAGE","content:blog:2025-roadmap.md","blog/2025-roadmap.md","blog/2025-roadmap",{"_path":191,"_dir":5,"_draft":6,"_partial":6,"_locale":7,"title":192,"description":193,"keywords":194,"author":11,"date":12,"category":13,"image":14,"_type":167,"_id":195,"_source":169,"_file":196,"_stem":197,"_extension":172},"/blog/ab-testing","A/B 测试","通过 A/B 测试验证设计方案","A/B 测试, Blog, HTMLPAGE","content:blog:ab-testing.md","blog/ab-testing.md","blog/ab-testing",1774945288128]