From 894f75fb3b0da48ab9fede586b8d24c5853ec9b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20Mail=C3=A4nder?= Date: Sun, 26 Jul 2015 18:24:00 +0200 Subject: [PATCH] provide a more helpful exception --- OpenRA.Game/TraitDictionary.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OpenRA.Game/TraitDictionary.cs b/OpenRA.Game/TraitDictionary.cs index 62210f4a59..a60bce30a9 100755 --- a/OpenRA.Game/TraitDictionary.cs +++ b/OpenRA.Game/TraitDictionary.cs @@ -156,7 +156,7 @@ namespace OpenRA if (index >= actors.Count || actors[index].ActorID != actor) return default(T); else if (index + 1 < actors.Count && actors[index + 1].ActorID == actor) - throw new InvalidOperationException("Actor has multiple traits of type `{0}`".F(typeof(T))); + throw new InvalidOperationException("Actor {0} has multiple traits of type `{1}`".F(actors[index].Info.Name, typeof(T))); else return traits[index]; }