improve error message (#5161)

My JAVA skills are minor and I can't compile it yet in my environment, hence this is a test only
This commit is contained in:
mi-hol 2023-03-08 16:11:59 +01:00 committed by GitHub
parent fca9f93fa2
commit da0eba081e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 2 deletions

View File

@ -202,8 +202,11 @@ public class BinaryProtocol {
}
int actualVersion = FileUtil.littleEndianWrap(response, 1, requestSize).getInt();
if (actualVersion != TS_FILE_VERSION) {
log.error("Got TS_CONFIG_VERSION " + actualVersion);
return "Incompatible firmware format=" + actualVersion + " while format " + TS_FILE_VERSION + " expected";
String errorMessage =
"Incompatible firmware format=" + actualVersion + " while format " + TS_FILE_VERSION + " expected" + "\n"
+ "recommended fix: use a compatible console version OR flash new firmware";
log.error(errorMessage);
return errorMessage;
}
return null;
}