From 23fbc518692e39340768c587861c624ad5ebcb00 Mon Sep 17 00:00:00 2001 From: Aptivi CEO Date: Tue, 8 Oct 2024 22:48:08 +0300 Subject: [PATCH] imp - Expand invalid vCard/vCalendar message --- To make this message more cohesive, we've decided to expand it a bit to indicate what exactly we're dealing with (vCard and vCalendar). --- Type: imp Breaking: False Doc Required: False Backport Required: False Part: 1/1 --- VisualCard.Calendar/CalendarTools.cs | 4 ++-- VisualCard/CardTools.cs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/VisualCard.Calendar/CalendarTools.cs b/VisualCard.Calendar/CalendarTools.cs index 095d4b1..f43687f 100644 --- a/VisualCard.Calendar/CalendarTools.cs +++ b/VisualCard.Calendar/CalendarTools.cs @@ -120,7 +120,7 @@ public static Parts.Calendar[] GetCalendars(StreamReader stream) // All vCalendars must begin with BEGIN:VCALENDAR if (!prefix.EqualsNoCase(VcardConstants._beginSpecifier) && !value.EqualsNoCase(VCalendarConstants._objectVCalendarSpecifier) && !BeginSpotted) - throw new InvalidDataException($"This is not a valid vCalendar file."); + throw new InvalidDataException("This is not a valid vCalendar file."); else if (!BeginSpotted) { BeginSpotted = true; @@ -134,7 +134,7 @@ public static Parts.Calendar[] GetCalendars(StreamReader stream) if (prefix.EqualsNoCase(VcardConstants._versionSpecifier) && !value.EqualsNoCase("1.0") && !value.EqualsNoCase("2.0") && !VersionSpotted) - throw new InvalidDataException($"This has an invalid vCalendar version {CalendarLine}."); + throw new InvalidDataException($"This calendar has an invalid vCalendar version {CalendarLine}."); else if (!VersionSpotted && prefix.EqualsNoCase(VcardConstants._versionSpecifier)) { VersionSpotted = true; diff --git a/VisualCard/CardTools.cs b/VisualCard/CardTools.cs index 30bf23d..44224a9 100644 --- a/VisualCard/CardTools.cs +++ b/VisualCard/CardTools.cs @@ -156,7 +156,7 @@ public static Card[] GetCards(StreamReader stream) // All VCards must begin with BEGIN:VCARD if (!prefix.EqualsNoCase(VcardConstants._beginSpecifier) && !value.EqualsNoCase(VcardConstants._objectVCardSpecifier) && !BeginSpotted) - throw new InvalidDataException($"This is not a valid VCard contact file."); + throw new InvalidDataException("This is not a valid vCard contact file."); else if (!BeginSpotted) { BeginSpotted = true; @@ -174,7 +174,7 @@ public static Card[] GetCards(StreamReader stream) !value.EqualsNoCase("2.1") && !value.EqualsNoCase("3.0") && !value.EqualsNoCase("4.0") && !value.EqualsNoCase("5.0") && !VersionSpotted) - throw new InvalidDataException($"This has an invalid VCard version {CardLine}."); + throw new InvalidDataException($"This card has an invalid VCard version {CardLine}."); else if (!VersionSpotted && prefix.EqualsNoCase(VcardConstants._versionSpecifier)) { VersionSpotted = true;