When handling errors locally instead of propagating them, include the error data in logs or messages. Never discard caught errors with `_`. Use when writing try/catch, Result handling, or error case branches.
Scanned 5/27/2026
Install via CLI
openskills install ncaq/konoka---
name: use-error-info
description: When handling errors locally instead of propagating them, include the error data in logs or messages. Never discard caught errors with `_`. Use when writing try/catch, Result handling, or error case branches.
user-invocable: false
---
# エラー処理時にエラーデータを使う
エラーのようなものをcatchやcaseで受け取って、
そのまま上流にエラーを伝播させるのではなく、
その場所でエラーを処理するときは、
エラーデータを適切に使ってください。
例えば出現する原因を修正するのは困難だけど、
エラーによって致命的な問題にならない場合は、
普通は警告ログなどを出力してそのまま続行します。
その時警告ログにはエラーデータの内容を含めて、
開発者や利用者が問題を把握しやすいようにしてください。
エラーデータを`_`とかに代入してそのまま捨ててしまうことは禁止です。
No comments yet. Be the first to comment!