You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Exception Descriptions vs Messages is ambiguous #6576
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.
ID: b1ea31f6-516f-100d-046e-1a0445d92824
Version Independent ID: a713e8c9-8210-761d-9ae7-238793825ff3
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.
Activity
rpetrusha commentedon Jul 21, 2018
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.