Agent Skills: 错误处理规范 (Error Handling Best Practice)

Must follow when 编写包含 try-catch 的错误处理代码,确保 catch 块有实质处理逻辑,不为空、不仅记录日志、必须处理或重新抛出异常。触发词:try-catch规范、错误处理最佳实践、异常处理审查。

UncategorizedID: forge-town/skills/error-handling-best-practice

Install this agent skill to your local

pnpm dlx add-skill https://github.com/forge-town/skills/tree/HEAD/skills/error-handling-best-practice

Skill Files

Browse the full folder contents for error-handling-best-practice.

Download Skill

Loading file tree…

skills/error-handling-best-practice/SKILL.md

Skill Metadata

Name
error-handling-best-practice
Description
Must follow when 编写错误处理代码,必须使用 neverthrow 库进行函数式错误处理,禁止使用原生 try-catch。确保错误显式传递、类型安全、调用方强制处理错误。