Replace IndexOutOfRangeException with ArgumentOutOfRangeException in vector indexers #7

wants to merge 2 commits into


None yet
2 participants

Robmaister commented Nov 22, 2013

IndexOutOfRangeException is supposed to only be thrown internally for arrays. Everything else should be throwing ArgumentOutOfRangeExceptions. Even the BCL collections do this.

I copied the Vector3 class out to another project, VS2012's code analysis pointed this out as CA1065.

Same fix as andykorth/opentk#26.


thefiddler commented Nov 25, 2013

Thanks, this looks fine.

This is a breaking change so I'll merge it in the next major release.


Robmaister commented Nov 25, 2013

Sounds good. I just realized that the matrix classes do the same thing, I'll update those and add them to the pull request by then.

@Robmaister Robmaister Replace IndexOutOfRangeExceptions with ArgumentOutOfRangeExceptions i…
…n matrices.

Added a second indexer to the matrix classes to get the rows.

thefiddler commented May 20, 2014

This would be a breaking change with very little practical benefit. I hate doing this, but I will have to close this PR.

thefiddler closed this May 20, 2014

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