Use name of for exceptions.

This commit is contained in:
Matthias Mailänder
2025-07-21 12:57:40 +02:00
committed by Gustas Kažukauskas
parent a4966bc299
commit 53f959e4bf
4 changed files with 5 additions and 5 deletions

View File

@@ -43,7 +43,7 @@ namespace OpenRA.Mods.Common.Widgets
world = wr.World;
terrainInfo = world.Map.Rules.TerrainInfo as ITemplatedTerrainInfo;
if (terrainInfo == null)
throw new InvalidDataException("EditorTileBrush can only be used with template-based tilesets");
throw new InvalidDataException($"{nameof(EditorTileBrush)} can only be used with template-based tilesets");
editorActionManager = world.WorldActor.Trait<EditorActionManager>();
terrainRenderer = world.WorldActor.Trait<ITiledTerrainRenderer>();