Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not warn of setter-related exceptions when getting a property value #49

Open
cmeeren opened this issue Dec 18, 2016 · 1 comment
Open

Comments

@cmeeren
Copy link

cmeeren commented Dec 18, 2016

foreach (object key in Data.Keys)
{
    object value = Data[key];  // Data is an IDictionary
    // ...
}

The code above warns of NotSupportedException, which occurs when setting a value, not getting it. (Specifically, in this case, the exception is thrown when setting a value on a read-only dict, or when the object has a fixed size and the key doesn't exist.)

@kirbatious
Copy link

I agree, this is the main reason why I use // ReSharper Disable Once ExceptionNotDocumented. Would be lovely to get a fix for this at some point.

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

No branches or pull requests

2 participants