Update to new Throw message.
This commit is contained in:
Submodule test_runner/BuildData updated: d3e95dad61...e2edf6129d
@@ -73,12 +73,12 @@ u8 RunBattle(ArbUt::Random& rand, const PkmnLib::Battling::BattleLibrary* librar
|
||||
if (!battle->TrySetChoice(c1)) {
|
||||
if (c1->GetKind() == CreatureLib::Battling::TurnChoiceKind::Attack) {
|
||||
auto a = (CreatureLib::Battling::AttackTurnChoice*)c1;
|
||||
THROW("Failed to set move choice of move: '"
|
||||
<< a->GetAttack()->GetAttack()->GetName() << "' targeting side "
|
||||
<< (i32)a->GetTarget().GetSideIndex() << " and index " << (i32)a->GetTarget().GetCreatureIndex());
|
||||
THROW("Failed to set move choice of move: '", a->GetAttack()->GetAttack()->GetName(),
|
||||
"' targeting side ", (i32)a->GetTarget().GetSideIndex(), " and index ",
|
||||
(i32)a->GetTarget().GetCreatureIndex());
|
||||
} else {
|
||||
THROW("Failed to set choice of kind: "
|
||||
<< CreatureLib::Battling::TurnChoiceKindHelper::ToString(c1->GetKind()));
|
||||
THROW("Failed to set choice of kind: ",
|
||||
CreatureLib::Battling::TurnChoiceKindHelper::ToString(c1->GetKind()));
|
||||
}
|
||||
}
|
||||
Ensure(battle->TrySetChoice(c2));
|
||||
|
||||
@@ -44,7 +44,14 @@ int main(int argc, char** argv) {
|
||||
if (!workingDirectory.empty()) {
|
||||
chdir(std::filesystem::path(workingDirectory).c_str());
|
||||
}
|
||||
auto battleLib = BuildLibrary::Build("");
|
||||
|
||||
PkmnLib::Battling::BattleLibrary* battleLib;
|
||||
try {
|
||||
battleLib = BuildLibrary::Build("");
|
||||
} catch (const ArbUt::Exception& e) {
|
||||
std::cout << e.what() << std::endl;
|
||||
return 1;
|
||||
}
|
||||
if (battleLib == nullptr) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user