semver icon indicating copy to clipboard operation
semver copied to clipboard

Should Throw ArgumentOutOfRangeException for Negative Max Length

Open WalkerCodeRanger opened this issue 3 years ago • 0 comments

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.

WalkerCodeRanger avatar Jul 31 '22 01:07 WalkerCodeRanger