From 25386deef4eeee2f31e81da5fa2c026cd03ddba1 Mon Sep 17 00:00:00 2001 From: Kae <80987908+Novaenia@users.noreply.github.com> Date: Wed, 21 Aug 2024 17:20:49 +1000 Subject: [PATCH] Use formatting for that exception msg --- source/game/StarDungeonGenerator.cpp | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/source/game/StarDungeonGenerator.cpp b/source/game/StarDungeonGenerator.cpp index 9c40b32..8b2c9c2 100644 --- a/source/game/StarDungeonGenerator.cpp +++ b/source/game/StarDungeonGenerator.cpp @@ -654,13 +654,10 @@ namespace Dungeon { }); ground[1] = max(ground[1], liquid[1]); if (air.y() < ground.y()) - throw DungeonException("Invalid ground vs air constraint. Ground at: " + toString(ground.y()) + ". Air at: " - + toString(air.y()) - + ". Pixels: highest ground:" - + toString(ground) - + ", lowest air:" - + toString(air) - + ". Try moving your 'require there be air here' anchors above any other 'require there be (something) here' anchors."); + throw DungeonException::format( + "Invalid ground vs air contraint! Ground {} can't be above air {}" + " (try moving your 'require there be air here' anchors above any other 'require there be (something) here' anchors.)", + ground, air); return air.y(); }