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

Make Widget.Get<T>() throw on missing by default #2051

Closed
chrisforbes opened this issue Apr 26, 2012 · 1 comment
Closed

Make Widget.Get<T>() throw on missing by default #2051

chrisforbes opened this issue Apr 26, 2012 · 1 comment

Comments

@chrisforbes
Copy link
Member

This allows us to give a better error message than taking an NRE later.

If the widget is optional, we should have a .GetOrDefault() which retains the current behavior.

@chrisforbes
Copy link
Member Author

Fixed. There may be a little downstream fallout from this, but anything affected in a nontrivial way was broken anyway.

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

1 participant