Skip to content

Commit b9209ac

Browse files
committed
Use XmlException not XmlSyntaxException
1 parent ea99cce commit b9209ac

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

Rdmp.Core/Reports/DublinCore/DublinCoreDefinition.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
using System;
88
using System.IO;
99
using System.Linq;
10-
using System.Security;
10+
using System.Xml;
1111
using System.Xml.Linq;
1212

1313
namespace Rdmp.Core.Reports.DublinCore;
@@ -105,7 +105,7 @@ public void WriteXml(Stream to)
105105
public void LoadFrom(XElement element)
106106
{
107107
if (element.Name != "metadata")
108-
throw new XmlSyntaxException($"Expected metadata element but got {element}");
108+
throw new XmlException($"Expected metadata element but got {element}");
109109

110110
var descendants = element.Descendants().ToArray();
111111
Title = GetElement(descendants, "title", true);
@@ -137,7 +137,7 @@ private static string GetElement(XElement[] descendants, string tagLocalName, bo
137137
e.Name.LocalName.Equals(tagLocalName, StringComparison.CurrentCultureIgnoreCase));
138138

139139
if (match == null)
140-
return mandatory ? throw new XmlSyntaxException($"Failed to find mandatory tag {tagLocalName}") : null;
140+
return mandatory ? throw new XmlException($"Failed to find mandatory tag {tagLocalName}") : null;
141141

142142
return match.Value.Trim();
143143
}

Rdmp.UI/Rdmp.UI.csproj

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@
4949
</PackageReference>
5050
<PackageReference Include="ObjectListView.Repack.NET6Plus" Version="2.9.4" />
5151
<PackageReference Include="Scintilla.NET" Version="5.3.2.9" />
52-
<PackageReference Include="System.Security.Permissions" Version="8.0.0" />
5352
<PackageReference Include="System.Resources.Extensions" Version="7.0.0" />
5453
<PackageReference Include="System.Threading.AccessControl" Version="7.0.1" />
5554
<PackageReference Include="VPKSoft.ScintillaLexers.NET" Version="1.1.16" />

0 commit comments

Comments
 (0)