Skip to content

Commit

Permalink
Improve logging messages for mismatched version lists
Browse files Browse the repository at this point in the history
  • Loading branch information
Fred Kummer committed Oct 25, 2024
1 parent 2fd005f commit 862ce97
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions App/metadata_handler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ QStringList MetadataHandler::MakeListOfVersionNumbers(QJsonArray types, QJsonArr

//Our types and major versions lists are linked, they need to be the same size. Return early and cry about it if they aren't
if(types.size() != major_versions.size()){
pcon_->AddToLog("Type and Version List lengths do not match! Aborting Creating of Version Numbers List!");
pcon_->AddToLog("Type and version list lengths do not match. Aborting creation of version numbers list.");
return version_numbers;
}

Expand Down Expand Up @@ -324,7 +324,7 @@ bool MetadataHandler::CheckHardwareAndElectronics(int target_hardware_type, int
bool MetadataHandler::CheckIfTargetVersionInVersionLists(QJsonArray types, QJsonArray major_versions, int target_type, int target_major_version){
//Our types and major versions lists are linked, they need to be the same size
if(types.size() != major_versions.size()){
pcon_->AddToLog("Type and Version List lengths do not match! Aborting flash!");
pcon_->AddToLog("Type and version list lengths do not match. Aborting checking for matching versions.");
return false;
}

Expand Down
2 changes: 1 addition & 1 deletion App/port_connection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -583,7 +583,7 @@ QString PortConnection::GetHardwareNameFromResources(int hardware_type, int hard
QString PortConnection::GetHardwareNameFromResources(QJsonArray hardware_types, QJsonArray hardware_major_versions, QJsonArray electronics_types, QJsonArray electronics_major_versions){
//Whoa, our list size are messed up, abort. We need each pair of lists to match each other in size
if((hardware_types.size() != hardware_major_versions.size()) || (electronics_types.size() != electronics_major_versions.size())){
this->AddToLog("Type and Version List lengths do not match! Aborting getting hardware name!");
this->AddToLog("Type and version list lengths do not match. Aborting getting hardware name.");
return "";
}

Expand Down

0 comments on commit 862ce97

Please sign in to comment.