UI はローカライズ済みです。スキルの紹介と説明文書は選択した言語へ AI が自動翻訳し、コード・コマンド・パス・専門用語は原文のままです。原作者の文書が優先されます。
スキルを探す
生産性・共同作業 · SKILL.md

nvidia-nemo-rl-error-handling

nvidia-nemo-rl-error-handling

Error handling guidelines for NeMo-RL. Covers exception specificity, minimal try bodies, and else blocks.

Independent GitHub snapshot · Automated classification · Original documentation governs

スキルの説明

GitHub

name: nvidia-nemo-rl-error-handling description: Error handling guidelines for NeMo-RL. Covers exception specificity, minimal try bodies, and else blocks. license: Apache-2.0 AND CC-BY-4.0 metadata: when_to_use: Writing or reviewing exception handling; 'try-except', 'catch all exceptions', 'bare except', 'how to handle errors', during code review. author: NVIDIA

Error Handling

Use Specific Exceptions

When using try-except blocks, limit the except to the smallest set of errors possible.

Don't:

try:
    open(path, "r").read()
except:
    print("Failed to open file")

Do:

try:
    open(path, "r").read()
except FileNotFoundError:
    print("Failed to open file")
保存したスキル