Improve some exception types.

This commit is contained in:
RoosterDragon
2016-09-11 15:14:44 +01:00
parent adc968db76
commit 9f1c872340
6 changed files with 7 additions and 7 deletions

View File

@@ -45,7 +45,7 @@ namespace OpenRA.Mods.Common.Traits
protected UpgradeMultiplierTrait(UpgradeMultiplierTraitInfo info, string modifierType, string actorType)
{
if (info.Modifier.Length == 0)
throw new Exception("No modifiers in " + modifierType + " for " + actorType);
throw new ArgumentException("No modifiers in " + modifierType + " for " + actorType);
this.info = info;
IsTraitDisabled = info.UpgradeTypes.Length > 0 && info.BaseLevel > 0;
level = IsTraitDisabled ? 0 : info.BaseLevel;