From 048a4748b23309374afb7712a1141d98bd5e6fb3 Mon Sep 17 00:00:00 2001 From: Jonas Nyrup Date: Mon, 11 Apr 2022 21:02:42 +0200 Subject: [PATCH] Use `paramName` overload of ArgumentException --- QuestPDF/Fluent/TextExtensions.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/QuestPDF/Fluent/TextExtensions.cs b/QuestPDF/Fluent/TextExtensions.cs index 3de1847..9b7de06 100644 --- a/QuestPDF/Fluent/TextExtensions.cs +++ b/QuestPDF/Fluent/TextExtensions.cs @@ -185,7 +185,7 @@ namespace QuestPDF.Fluent public TextSpanDescriptor SectionLink(string? text, string sectionName) { if (IsNullOrEmpty(sectionName)) - throw new ArgumentException(nameof(sectionName)); + throw new ArgumentException("Section name cannot be null or empty", nameof(sectionName)); var style = DefaultStyle.Clone(); var descriptor = new TextSpanDescriptor(style); @@ -212,7 +212,7 @@ namespace QuestPDF.Fluent public TextSpanDescriptor Hyperlink(string? text, string url) { if (IsNullOrEmpty(url)) - throw new ArgumentException(nameof(url)); + throw new ArgumentException("Url cannot be null or empty", nameof(url)); var style = DefaultStyle.Clone(); var descriptor = new TextSpanDescriptor(style);