display where duplicate keys in MiniYaml are found
This commit is contained in:
@@ -93,7 +93,7 @@ namespace OpenRA.FileFormats
|
||||
foreach (var y in Nodes)
|
||||
{
|
||||
if (ret.ContainsKey(y.Key))
|
||||
throw new InvalidDataException("Duplicate key `{0}' in MiniYaml".F(y.Key));
|
||||
throw new InvalidDataException("Duplicate key `{0}' in {1}".F(y.Key, y.Location));
|
||||
ret.Add(y.Key, y.Value);
|
||||
}
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ namespace OpenRA
|
||||
{
|
||||
var key = w.Key.Substring( w.Key.IndexOf('@') + 1);
|
||||
if (widgets.ContainsKey(key))
|
||||
throw new InvalidDataException("Widget has duplicate Key `{0}`".F(w.Key));
|
||||
throw new InvalidDataException("Widget has duplicate Key `{0}` at {1}".F(w.Key, w.Location));
|
||||
widgets.Add(key, w);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user