[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

@@ -40,10 +40,10 @@ Ultrasonic::Ultrasonic(DigitalOutput* pingChannel, DigitalInput* echoChannel)
m_echoChannel(echoChannel, NullDeleter<DigitalInput>()),
m_counter(m_echoChannel) {
if (!pingChannel) {
throw FRC_MakeError(err::NullParameter, "pingChannel");
throw FRC_MakeError(err::NullParameter, "{}", "pingChannel");
}
if (!echoChannel) {
throw FRC_MakeError(err::NullParameter, "echoChannel");
throw FRC_MakeError(err::NullParameter, "{}", "echoChannel");
}
Initialize();
}
@@ -83,7 +83,7 @@ Ultrasonic::~Ultrasonic() {
void Ultrasonic::Ping() {
if (m_automaticEnabled) {
throw FRC_MakeError(err::IncompatibleMode,
throw FRC_MakeError(err::IncompatibleMode, "{}",
"cannot call Ping() in automatic mode");
}