Skip to content

Commit c822e2c

Browse files
authored
Merge pull request #29 from unoplatform/dev/jela/net9
fix: Enhance parse error message
2 parents 8bd69ad + 35ee7ef commit c822e2c

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

Diff for: src/NvGet/Extensions/XmlDocumentExtensions.cs

+8-1
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,14 @@ public static async Task<XmlDocument> LoadDocument(this string path, Cancellatio
204204
PreserveWhitespace = true,
205205
};
206206

207-
document.Load(path);
207+
try
208+
{
209+
document.Load(path);
210+
}
211+
catch(Exception e)
212+
{
213+
throw new Exception($"Failed to parse file {path}", e);
214+
}
208215
#endif
209216

210217
return document;

0 commit comments

Comments
 (0)