LogoClawIndex
案例技能关于
LogoClawIndex

m06-error-handling - 错误处理

提供使用 Result、Option、panic、anyhow 和 thiserror 进行 Rust 错误处理的指南与模式。

标签

更新于: 2026-09-14
rust错误处理resultoptionanyhowthiserror

能力

典型输入

典型输出

该技能可以做什么

  • 选择错误处理策略
  • 区分 panic 与 Result
  • 选择 thiserror 或 anyhow
  • 使用问号运算符传播错误
  • 添加错误上下文

输入

  • 错误处理上下文
  • 库或应用代码类型
  • 失败场景信息

输出

  • 错误处理策略建议
  • 错误 Crate 选择建议

要求

    来源

    • 规范: SKILL.md

    ClawIndex

    OpenClaw Skills 与 Use Case 索引

    ClawIndex 是一个生态驱动的 OpenClaw Skills 与真实 Use Case 索引站。

    索引

    Skills·
    Cases

    Meta

    关于·
    声明·
    邮箱·
    GitHub
    © 2026 ClawIndex 保留所有权利。
    选择错误处理策略
    区分 panic 与 Result
    选择 thiserror 或 anyhow
    使用问号运算符传播错误
    错误处理上下文
    库或应用代码类型
    失败场景信息
    错误处理策略建议
    错误 Crate 选择建议