错误处理规范 (Error Handling Best Practice)
使用说明
- 阅读 references/checklist.md 获取完整检查清单
- 参考 best-practice-examples/errorHandlingExamples.ts 了解 neverthrow 正确用法
核心规则: 使用 neverthrow 的 Result<T, E> 类型替代原生 try-catch,错误必须显式传递,禁止静默捕获
Must follow when 编写包含 try-catch 的错误处理代码,确保 catch 块有实质处理逻辑,不为空、不仅记录日志、必须处理或重新抛出异常。触发词:try-catch规范、错误处理最佳实践、异常处理审查。
Browse the full folder contents for error-handling-best-practice.
Loading file tree…
Skill Metadata
核心规则: 使用 neverthrow 的 Result<T, E> 类型替代原生 try-catch,错误必须显式传递,禁止静默捕获