Skip to content

Solution to the "Localized exceptions" problem #474

@mlsomers

Description

@mlsomers

The problem is well known and there are some workarounds available. Previous requests for a structural fix have not received much attention.

A preferred solution would be to have an app.config element (I suggest adding it to the runtime element) that would enable us to get non-localized messages in a specific deployment (e.g. on a developers machine).

Another approuch could be to add a new property to the Exception class called MessageNonLocalized (to keep it near Message in intellisense). Also update the ToString method to use that message instead of the localized one. (ToString() also adds the stacktrace, so this is for developers any way).

I know that we may be able to write extension methods or other workarounds, but jumping through a hoop whenever trying to debug some code can become tiresome, especially if it's not your own code or just an open source sidekick.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions