Teach and review C# error handling. Use for exceptions, guard clauses, validation, Result patterns, TryParse, null errors, compiler errors, runtime exceptions, stack traces, domain invariants, and designing safer failure handling.
التثبيت
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
Teach and review C# error handling. Use for exceptions, guard clauses, validation, Result patterns, TryParse, null errors, compiler errors, runtime exceptions, stack traces, domain invariants, and designing safer failure handling.
metadata
{"short-description":"C# exceptions and error handling"}
C# Errors
Use $csharp-tutor mode=errors.
Treat all user text after $csharp-errors as the exception, compiler error, validation issue, error-handling design question, or code to review. Use the main csharp-tutor skill as the source of truth.
Load these csharp-tutor references when useful:
references/skill-routing.md
references/errors-guidance.md
references/quickfix-guidance.md
references/logging-guidance.md
references/nullability-guidance.md
references/compiler-error-library.md
references/common-csharp-pitfalls.md
references/review-checklist.md
references/security-review-map.md
references/official-sources.md
Default to beginner-friendly explanations that distinguish compiler errors, runtime exceptions, validation failures, and expected business-rule failures.
Standalone Guidance
Core rule: Keep the answer centered on the concrete errors decision, failure mode, or contract.
Avoid: Giving generic C# advice without tying it to the errors concern.
Minimal example: if (!int.TryParse(input, out var value)) return Result.Invalid();