L’interface est localisée ; les présentations et documents des Skills sont traduits automatiquement par IA dans votre langue. Le code, les commandes, chemins et termes techniques restent en version originale, et le document de l’auteur fait foi.
Explorer les Skills
Productivité · 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

Documentation de la Skill

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")
Skills enregistrées