From b9209ac59b6cafc47fd62f96d77d2b9b262fd04f Mon Sep 17 00:00:00 2001 From: jas88 Date: Thu, 30 Nov 2023 16:49:03 -0600 Subject: [PATCH] Use XmlException not XmlSyntaxException --- Rdmp.Core/Reports/DublinCore/DublinCoreDefinition.cs | 6 +++--- Rdmp.UI/Rdmp.UI.csproj | 1 - 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/Rdmp.Core/Reports/DublinCore/DublinCoreDefinition.cs b/Rdmp.Core/Reports/DublinCore/DublinCoreDefinition.cs index 1be3fe6333..e36004b1cc 100644 --- a/Rdmp.Core/Reports/DublinCore/DublinCoreDefinition.cs +++ b/Rdmp.Core/Reports/DublinCore/DublinCoreDefinition.cs @@ -7,7 +7,7 @@ using System; using System.IO; using System.Linq; -using System.Security; +using System.Xml; using System.Xml.Linq; namespace Rdmp.Core.Reports.DublinCore; @@ -105,7 +105,7 @@ public void WriteXml(Stream to) public void LoadFrom(XElement element) { if (element.Name != "metadata") - throw new XmlSyntaxException($"Expected metadata element but got {element}"); + throw new XmlException($"Expected metadata element but got {element}"); var descendants = element.Descendants().ToArray(); Title = GetElement(descendants, "title", true); @@ -137,7 +137,7 @@ private static string GetElement(XElement[] descendants, string tagLocalName, bo e.Name.LocalName.Equals(tagLocalName, StringComparison.CurrentCultureIgnoreCase)); if (match == null) - return mandatory ? throw new XmlSyntaxException($"Failed to find mandatory tag {tagLocalName}") : null; + return mandatory ? throw new XmlException($"Failed to find mandatory tag {tagLocalName}") : null; return match.Value.Trim(); } diff --git a/Rdmp.UI/Rdmp.UI.csproj b/Rdmp.UI/Rdmp.UI.csproj index 51c39dc99a..ceb582b426 100644 --- a/Rdmp.UI/Rdmp.UI.csproj +++ b/Rdmp.UI/Rdmp.UI.csproj @@ -49,7 +49,6 @@ -