Skip to content

Commit

Permalink
Merge pull request #29 from unoplatform/dev/jela/net9
Browse files Browse the repository at this point in the history
fix: Enhance parse error message
  • Loading branch information
jeromelaban authored Jan 17, 2025
2 parents 8bd69ad + 35ee7ef commit c822e2c
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/NvGet/Extensions/XmlDocumentExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,14 @@ public static async Task<XmlDocument> LoadDocument(this string path, Cancellatio
PreserveWhitespace = true,
};

document.Load(path);
try
{
document.Load(path);
}
catch(Exception e)
{
throw new Exception($"Failed to parse file {path}", e);
}
#endif

return document;
Expand Down

0 comments on commit c822e2c

Please sign in to comment.