[wpilibc] Errors: Use fmtlib

This commit is contained in:
Peter Johnson
2021-05-23 19:33:33 -07:00
parent 87603e400d
commit 831c10bdfc
55 changed files with 551 additions and 533 deletions

View File

@@ -180,11 +180,11 @@ class CommandScheduler final : public frc::Sendable,
Command, std::remove_reference_t<T>>>>
void SetDefaultCommand(Subsystem* subsystem, T&& defaultCommand) {
if (!defaultCommand.HasRequirement(subsystem)) {
throw FRC_MakeError(frc::err::CommandIllegalUse,
throw FRC_MakeError(frc::err::CommandIllegalUse, "{}",
"Default commands must require their subsystem!");
}
if (defaultCommand.IsFinished()) {
throw FRC_MakeError(frc::err::CommandIllegalUse,
throw FRC_MakeError(frc::err::CommandIllegalUse, "{}",
"Default commands should not end!");
}
SetDefaultCommandImpl(subsystem,