Update to new THROW macro.
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@@ -95,7 +95,7 @@ TargetList TargetResolver::ResolveTargets(const CreatureIndex& index, AttackTarg
|
||||
return arr;
|
||||
}
|
||||
}
|
||||
THROW("Unknown attack target kind: '" << AttackTargetHelper::ToString(target) << "'.")
|
||||
THROW("Unknown attack target kind: '", AttackTargetHelper::ToString(target), "'.")
|
||||
}
|
||||
|
||||
bool TargetResolver::IsValidTarget(const CreatureIndex& index, CreatureLib::Library::AttackTarget target,
|
||||
@@ -149,5 +149,5 @@ bool TargetResolver::IsValidTarget(const CreatureIndex& index, CreatureLib::Libr
|
||||
return index == userIndex;
|
||||
}
|
||||
}
|
||||
THROW("Unknown attack target kind: '" << AttackTargetHelper::ToString(target) << "'.")
|
||||
THROW("Unknown attack target kind: '", AttackTargetHelper::ToString(target), "'.")
|
||||
}
|
||||
|
||||
@@ -15,14 +15,7 @@ void TurnHandler::RunTurn(const ArbUt::BorrowedPtr<ChoiceQueue>& queue, const Ar
|
||||
EnsureNotNull(item)
|
||||
Ensure(item->GetUser()->GetBattle().HasValue())
|
||||
Ensure(item->GetUser()->GetBattleSide().HasValue())
|
||||
auto index = (uint32_t)item->GetUser()->GetBattleSide().GetValue()->GetCreatureIndex(item->GetUser());
|
||||
|
||||
try_creature(ExecuteChoice(item.get()),
|
||||
"Executing choice failed for choice by mon on side "
|
||||
<< ((uint32_t)item->GetUser()->GetBattleSide().GetValue()->GetSideIndex()) << " and index "
|
||||
<< index << ". Choice had choice kind "
|
||||
<< CreatureLib::Battling::TurnChoiceKindHelper::ToString(item->GetKind()) << " "
|
||||
<< " with message");
|
||||
ExecuteChoice(item.get());
|
||||
}
|
||||
if (!battle->HasEnded()) {
|
||||
ArbUt::List<ScriptWrapper> scripts;
|
||||
@@ -250,7 +243,7 @@ void TurnHandler::HandleAttackForTarget(ExecutingAttack* attack, const ArbUt::Bo
|
||||
} catch (const ArbUt::Exception& e) {
|
||||
throw e;
|
||||
} catch (const std::exception& e) {
|
||||
THROW("Exception during status attack effect handling: " << e.what() << ".");
|
||||
THROW("Exception during status attack effect handling: ", e.what(), ".");
|
||||
}
|
||||
}
|
||||
} else {
|
||||
@@ -282,7 +275,7 @@ void TurnHandler::HandleAttackForTarget(ExecutingAttack* attack, const ArbUt::Bo
|
||||
} catch (const ArbUt::Exception& e) {
|
||||
throw e;
|
||||
} catch (const std::exception& e) {
|
||||
THROW("Exception during offensive attack secondary effect handling: " << e.what() << ".");
|
||||
THROW("Exception during offensive attack secondary effect handling: ", e.what(), ".");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user