From 6d3c027a084035eefa4ca0c384a777f279dccad5 Mon Sep 17 00:00:00 2001 From: Deukhoofd Date: Sun, 21 Nov 2021 12:40:25 +0100 Subject: [PATCH] Update to new THROW message. --- src/Battling/Pokemon/CreatePokemon.cpp | 4 ++-- src/ScriptResolving/AngelScript/AngelScriptFunctionCall.hpp | 2 +- src/ScriptResolving/AngelScript/AngelScriptResolver.cpp | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Battling/Pokemon/CreatePokemon.cpp b/src/Battling/Pokemon/CreatePokemon.cpp index 8b7ad54..6cb0623 100644 --- a/src/Battling/Pokemon/CreatePokemon.cpp +++ b/src/Battling/Pokemon/CreatePokemon.cpp @@ -65,7 +65,7 @@ namespace PkmnLib::Battling { if (!this->_heldItem.IsEmpty()) { auto item = _library->GetItemLibrary()->TryGet(this->_heldItem); if (!item.has_value()) { - THROW("Unknown Item: " << this->_heldItem.std_str()); + THROW("Unknown Item: ", this->_heldItem.std_str()); } heldItem = item.value(); } @@ -147,7 +147,7 @@ namespace PkmnLib::Battling { CreatureLib::Battling::AttackLearnMethod method) { auto v = _library->GetMoveLibrary()->TryGet(moveName); if (!v.has_value()) { - THROW("Invalid Move given: " << moveName.std_str()); + THROW("Invalid Move given: ", moveName.std_str()); } if (_currentMove >= _library->GetSettings()->GetMaximalAttacks()) { throw ArbUt::Exception("This pokemon already has the maximal allowed moves."); diff --git a/src/ScriptResolving/AngelScript/AngelScriptFunctionCall.hpp b/src/ScriptResolving/AngelScript/AngelScriptFunctionCall.hpp index 860080e..3ec8200 100644 --- a/src/ScriptResolving/AngelScript/AngelScriptFunctionCall.hpp +++ b/src/ScriptResolving/AngelScript/AngelScriptFunctionCall.hpp @@ -43,7 +43,7 @@ public: } else { ctx->PopState(); } - THROW("Script didn't finish properly; message " << scriptResult); + THROW("Script didn't finish properly; message ", scriptResult); } onEnd(ctx); if (newContext) { diff --git a/src/ScriptResolving/AngelScript/AngelScriptResolver.cpp b/src/ScriptResolving/AngelScript/AngelScriptResolver.cpp index 0128a8e..e07eeda 100644 --- a/src/ScriptResolving/AngelScript/AngelScriptResolver.cpp +++ b/src/ScriptResolving/AngelScript/AngelScriptResolver.cpp @@ -438,7 +438,7 @@ void AngelScriptResolver::InitializeByteCode( _evolutionTypes.Set(val.first, type); } } else { - THROW("Resolving unknown script category value: " << innerDb.first); + THROW("Resolving unknown script category value: ", innerDb.first); } } }