More debug code

This commit is contained in:
Rick Falkvinge
2021-02-04 12:18:50 +01:00
parent a85d93f57c
commit 3d955434dd
+5
View File
@@ -40,6 +40,11 @@ namespace Swarmops.Logic.Support
Console.WriteLine("XML: " + xml);
Console.WriteLine("FromXml before new XmlSerializer()");
if (xml.Trim().Length < 1)
{
throw new InvalidOperationException("xml is empty"); // Catch a weird empty-XML error and try to get a stack trace
}
XmlSerializer serializer = new XmlSerializer (typeof (T));
MemoryStream stream = new MemoryStream();