Use name of for exceptions.
This commit is contained in:
committed by
Gustas Kažukauskas
parent
a4966bc299
commit
53f959e4bf
@@ -73,7 +73,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
map = world.Map;
|
||||
terrainInfo = map.Rules.TerrainInfo as DefaultTerrain;
|
||||
if (terrainInfo == null)
|
||||
throw new InvalidDataException("TerrainRenderer can only be used with the DefaultTerrain parser");
|
||||
throw new InvalidDataException($"{nameof(TerrainRenderer)} can only be used with the {nameof(DefaultTerrain)} parser");
|
||||
|
||||
tileCache = new DefaultTileCache(terrainInfo);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user