Skip to content

Commit

Permalink
Fix code smell (#218)
Browse files Browse the repository at this point in the history
* Fix code smell
  • Loading branch information
jonasanker authored Nov 1, 2023
1 parent 4673fac commit d698e8e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion coffeecard/CoffeeCard.Library/Utils/ProductExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public static bool IsPerk(this Product product)
{
if (product.ProductUserGroup == null)
{
throw new NullReferenceException("Product User Group must not be null");
throw new ArgumentNullException($"{nameof(Product.ProductUserGroup)} must not be null");
}

return product.ProductUserGroup.Any(pug => pug.UserGroup != UserGroup.Customer);
Expand Down

0 comments on commit d698e8e

Please sign in to comment.