Improve logging on sequence error.
This commit is contained in:
@@ -34,6 +34,8 @@ namespace OpenRA.Mods.Common.Graphics
|
|||||||
var nodes = node.Value.ToDictionary();
|
var nodes = node.Value.ToDictionary();
|
||||||
|
|
||||||
MiniYaml defaults;
|
MiniYaml defaults;
|
||||||
|
try
|
||||||
|
{
|
||||||
if (nodes.TryGetValue("Defaults", out defaults))
|
if (nodes.TryGetValue("Defaults", out defaults))
|
||||||
{
|
{
|
||||||
nodes.Remove("Defaults");
|
nodes.Remove("Defaults");
|
||||||
@@ -43,6 +45,11 @@ namespace OpenRA.Mods.Common.Graphics
|
|||||||
n.Value.Value = n.Value.Value ?? defaults.Value;
|
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)
|
foreach (var kvp in nodes)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user