From bf35369fe9e5c465e3671bd947495a764708abc6 Mon Sep 17 00:00:00 2001 From: Still Hsu <341464@gmail.com> Date: Fri, 31 Aug 2018 16:31:20 +0800 Subject: [PATCH] Cleanup https://github.com/RogueException/Discord.Net/pull/1128 --- src/Discord.Net.Core/Utils/TokenUtils.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Discord.Net.Core/Utils/TokenUtils.cs b/src/Discord.Net.Core/Utils/TokenUtils.cs index 2cc0f1041..6ff36548c 100644 --- a/src/Discord.Net.Core/Utils/TokenUtils.cs +++ b/src/Discord.Net.Core/Utils/TokenUtils.cs @@ -13,13 +13,13 @@ namespace Discord /// /// The type of token to validate. /// The token value to validate. - /// Thrown when the supplied token string is null, empty, or contains only whitespace. - /// Thrown when the supplied TokenType or token value is invalid. + /// Thrown when the supplied token string is null, empty, or contains only whitespace. + /// Thrown when the supplied or token value is invalid. public static void ValidateToken(TokenType tokenType, string token) { // A Null or WhiteSpace token of any type is invalid. if (string.IsNullOrWhiteSpace(token)) - throw new ArgumentNullException("A token cannot be null, empty, or contain only whitespace.", nameof(token)); + throw new ArgumentNullException(nameof(token), "A token cannot be null, empty, or contain only whitespace."); switch (tokenType) { @@ -38,7 +38,7 @@ namespace Discord break; default: // All unrecognized TokenTypes (including User tokens) are considered to be invalid. - throw new ArgumentException("Unrecognized TokenType.", nameof(token)); + throw new ArgumentException($"Unrecognized {nameof(token)}.", nameof(token)); } }