From 975cb5144bc0a624d5d53422ac7a0154f9996752 Mon Sep 17 00:00:00 2001 From: WrinklyNinja Date: Thu, 1 Aug 2013 21:53:18 +0100 Subject: [PATCH] Simplified handling of parsing errors during masterlist update. --- src/backend/network.cpp | 6 +++--- src/backend/network.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/backend/network.cpp b/src/backend/network.cpp index a0480ad3..ed25716d 100644 --- a/src/backend/network.cpp +++ b/src/backend/network.cpp @@ -193,7 +193,7 @@ namespace boss { throw boss::error(boss::error::git_error, error_message); } - std::string UpdateMasterlist(Game& game, std::vector& parsingErrors, std::list& plugins, std::list& messages) { + std::string UpdateMasterlist(Game& game, std::list& parsingErrors, std::list& plugins, std::list& messages) { //First need to decide how the masterlist is updated: using Git or Subversion? //Look at the update URL to decide. @@ -301,7 +301,7 @@ namespace boss { //Roll back one revision if there's an error. BOOST_LOG_TRIVIAL(error) << "Masterlist parsing failed. Masterlist revision " + revision + ": " + e.what(); - parsingErrors.push_back("Masterlist revision " + revision + ": " + e.what()); + parsingErrors.push_back(boss::Message(boss::g_message_error, "Masterlist revision " + revision + ": " + e.what())); command = g_path_svn.string() + " update --revision PREV \"" + game.MasterlistPath().string() + "\""; @@ -548,7 +548,7 @@ namespace boss { //Roll back one revision if there's an error. BOOST_LOG_TRIVIAL(error) << "Masterlist parsing failed. Masterlist revision " + string(revision) + ": " + e.what(); - parsingErrors.push_back("Masterlist revision " + string(revision) + ": " + e.what()); + parsingErrors.push_back(boss::Message(boss::g_message_error, "Masterlist revision " + string(revision) + ": " + e.what())); } } while (parsingFailed); diff --git a/src/backend/network.h b/src/backend/network.h index ae1d46d2..dfd53c58 100644 --- a/src/backend/network.h +++ b/src/backend/network.h @@ -63,6 +63,6 @@ namespace boss { So when using Git, the Game::URL() function would return the path to the repository, and BOSS would expect that the masterlist be in the root directory of the repository, which is not unreasonable. */ - std::string UpdateMasterlist(Game& game, std::vector& parsingErrors, std::list& plugins, std::list& messages); + std::string UpdateMasterlist(Game& game, std::list& parsingErrors, std::list& plugins, std::list& messages); } #endif