diff --git a/OpenRA.FileFormats/MiniYaml.cs b/OpenRA.FileFormats/MiniYaml.cs index 965f8e362e..4aed94cfdd 100755 --- a/OpenRA.FileFormats/MiniYaml.cs +++ b/OpenRA.FileFormats/MiniYaml.cs @@ -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); } diff --git a/OpenRA.Game/Widgets/WidgetLoader.cs b/OpenRA.Game/Widgets/WidgetLoader.cs index 0d168e2c3f..12e7604959 100644 --- a/OpenRA.Game/Widgets/WidgetLoader.cs +++ b/OpenRA.Game/Widgets/WidgetLoader.cs @@ -20,15 +20,15 @@ namespace OpenRA { Dictionary widgets = new Dictionary(); - public WidgetLoader( ModData modData ) + public WidgetLoader(ModData modData) { - foreach( var file in modData.Manifest.ChromeLayout.Select( a => MiniYaml.FromFile( a ) ) ) + foreach (var file in modData.Manifest.ChromeLayout.Select(a => MiniYaml.FromFile(a))) foreach( var w in file ) { - var key = w.Key.Substring( w.Key.IndexOf( '@' ) + 1 ); + var key = w.Key.Substring( w.Key.IndexOf('@') + 1); if (widgets.ContainsKey(key)) - throw new InvalidDataException("Widget has duplicate Key `{0}`".F(w.Key)); - widgets.Add( key, w ); + throw new InvalidDataException("Widget has duplicate Key `{0}` at {1}".F(w.Key, w.Location)); + widgets.Add(key, w); } }