Improve logging on sequence error.

This commit is contained in:
Paul Chote
2016-07-03 12:13:26 +01:00
parent 77e00e4587
commit 5fbe747de2

View File

@@ -34,6 +34,8 @@ namespace OpenRA.Mods.Common.Graphics
var nodes = node.Value.ToDictionary();
MiniYaml defaults;
try
{
if (nodes.TryGetValue("Defaults", out defaults))
{
nodes.Remove("Defaults");
@@ -43,6 +45,11 @@ namespace OpenRA.Mods.Common.Graphics
n.Value.Value = n.Value.Value ?? defaults.Value;
}
}
}
catch (Exception e)
{
throw new Exception("Error occurred while parsing {0}".F(node.Key), e);
}
foreach (var kvp in nodes)
{