I have a method in dll
private static void SaveXmlStringToXmlFile(string xmlString, string xmlFileFullPath)
{
XDocument.Parse(xmlString).Save(xmlFileFullPath);
}
I know that Parse
and Save
can throw several exceptions. Anyway I have no idea how to handle these exceptions because it's a dll.
Put a try/catch throw;
around the code. Isn't this redundant to the present code?
What's the best practice?
EDIT: Let's assume the user of the dll doen't have any influence on what xmlString
could be.