Skip to content

Improve error-writing documentation#120

Draft
Reefact wants to merge 8 commits into
mainfrom
agent/improve-error-writing-docs
Draft

Improve error-writing documentation#120
Reefact wants to merge 8 commits into
mainfrom
agent/improve-error-writing-docs

Conversation

@Reefact

@Reefact Reefact commented Jul 14, 2026

Copy link
Copy Markdown
Owner

Summary

This PR separates stable error documentation from runtime message guidance so developers can write precise, safe, and diagnosable errors without navigating overlapping pages. It also turns the best-practices page and FAQ into concise entry points that direct readers to the focused guides.

Type of change

  • Bug fix
  • New feature
  • Breaking change
  • Refactoring
  • Analyzer / diagnostic change
  • Tests
  • Documentation
  • Build / CI / tooling

Changes

  • Rewrite the English and French error-documentation guides around one complete example and a review checklist.
  • Add dedicated English and French guides for ShortMessage, DetailedMessage, and DiagnosticMessage.
  • Document audience separation, sensitive-data boundaries, ErrorContext, RFC 9457 mapping, and localization with concrete good/bad examples.
  • Replace the duplicated best-practices explanations with a compact project and pull-request checklist.
  • Shorten the FAQ and make it direct readers to the focused documentation instead of repeating it.
  • Keep all English and French pages structurally aligned and update their navigation links.

Testing

  • dotnet build FirstClassErrors.sln
  • dotnet test FirstClassErrors.sln
  • Analyzer tests pass (FirstClassErrors.Analyzers.UnitTests)

No build or test command was run because this PR changes Markdown documentation only. The branch diff and cross-page navigation were reviewed manually.

Documentation

  • Public API / error documentation updated
  • README / doc/ updated
  • French translation (doc/README.fr.md) updated if user-facing behavior changed
  • No documentation change required

The French counterparts of every changed or added English page are included. doc/README.fr.md itself did not require a change because the existing Writing Errors Guide remains the entry point and now links to the new message guide.

Related issues

None.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant