Skip to content

Exception Descriptions vs Messages is ambiguous #6576

Closed

Description

@Pxtl

The guide describes the importance of good descriptions that will be used for internationalizing, but also describes grammatically correct messages. The Exception class has only a message, and it is generally formatted to be a full error message. Using the message also as a key for internationalizing seems like a bad idea - are they supposed to be two separate members, an internationalization key "description" and a user-friendly "message"? Or are we supposed to double-dip on the "message"? If so, then the "description" terminology is misleading.


Document Details

⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Activity

  1. added this to the Backlog milestone on Jul 20, 2018
  2. self-assigned this
    on Jul 21, 2018
  3. rpetrusha commented on Jul 21, 2018

    @rpetrusha
    Contributor

    Thanks, @Pxtl, for submitting another feedback item.
    The term "description" appears suddenly in this article with no explanation. It is in fact the Message property, which is intended to be a localized string. Typically, localized exception messages are stored as values corresponding to a named key in a resource file. For information on using resources in .NET applications, see Resources in Desktop Apps and ResourceManager Class.

    I've opened PR #6597 to clarify the confusion created by the abrupt introduction of the term "description". It aims at providing a quick fix, though. Localizing exception messages is an important topic, but one that's not addressed in the documentation. I'll also open an issue and add it to our backlog to create a new topic about creating localized exception messages.

    Again, thanks for raising this issue.

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions