error message 'unrecognized function enum' from detector or receiver prepended with Software version mismatch to handle enum start change between v6 and v7 (#680)

This commit is contained in:
Dhanya Thattil
2023-02-22 11:11:46 +01:00
committed by GitHub
parent 8501e1fb1f
commit f7618fbb93
4 changed files with 48 additions and 43 deletions

View File

@ -234,8 +234,7 @@ int ClientInterface::decodeFunction(Interface &socket) {
socket.Receive(fnum);
socket.setFnum(fnum);
if (fnum <= NUM_DET_FUNCTIONS || fnum >= NUM_REC_FUNCTIONS) {
throw RuntimeError("Unrecognized Function enum " +
std::to_string(fnum) + "\n");
throw RuntimeError(UNRECOGNIZED_FNUM_ENUM + std::to_string(fnum));
} else {
LOG(logDEBUG1) << "calling function fnum: " << fnum << " ("
<< getFunctionNameFromEnum((enum detFuncs)fnum) << ")";