semver
semver copied to clipboard
Should Throw ArgumentOutOfRangeException for Negative Max Length
Currently, the Parse and TryParse methods do not validate the maxLength argument. So if it is negative, they report that as an error with the version string being too long rather than an argument exception.
This is a breaking change because for Parse it changes the exception type and for TryParse it throws an exception in a case that previously didn't throw an exception.