Correct empty value exception (#3064)
This commit is contained in:
committed by
GitHub
parent
c625f5fe0b
commit
6e7b3c2577
@@ -545,7 +545,7 @@ namespace Discord
|
||||
{
|
||||
var stringValue = value?.ToString();
|
||||
if (string.IsNullOrWhiteSpace(stringValue))
|
||||
throw new ArgumentException(message: "Field value must not be null or empty.", paramName: nameof(Value));
|
||||
throw new ArgumentException(message: "Field value must not be null, empty or entirely whitespace.", paramName: nameof(Value));
|
||||
if (stringValue.Length > MaxFieldValueLength)
|
||||
throw new ArgumentException(message: $"Field value length must be less than or equal to {MaxFieldValueLength}.", paramName: nameof(Value));
|
||||
_value = stringValue;
|
||||
|
||||
Reference in New Issue
Block a user