From 939f3389d51e1c2d46614609660c04e14ca97b91 Mon Sep 17 00:00:00 2001 From: Leon Styhre Date: Wed, 5 Aug 2020 10:51:02 +0200 Subject: [PATCH] Improved the ScreenScraper error reporting. --- es-app/src/guis/GuiScraperSearch.cpp | 6 ++++-- es-app/src/scrapers/ScreenScraper.cpp | 5 +---- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/es-app/src/guis/GuiScraperSearch.cpp b/es-app/src/guis/GuiScraperSearch.cpp index 2db510dc1..fb0d873a7 100644 --- a/es-app/src/guis/GuiScraperSearch.cpp +++ b/es-app/src/guis/GuiScraperSearch.cpp @@ -350,14 +350,16 @@ void GuiScraperSearch::onSearchDone(const std::vector& resu void GuiScraperSearch::onSearchError(const std::string& error) { if (mScrapeCount > 1) { - LOG(LogInfo) << "GuiScraperSearch search error: " << error; + LOG(LogError) << "GuiScraperSearch search error: " << + Utils::String::replace(error, "\n", ""); mWindow->pushGui(new GuiMsgBox(mWindow, getHelpStyle(), Utils::String::toUpper(error), "RETRY", std::bind(&GuiScraperSearch::search, this, mLastSearch), "SKIP", mSkipCallback, "CANCEL", mCancelCallback)); } else { - LOG(LogInfo) << "GuiScraperSearch search error: " << error; + LOG(LogError) << "GuiScraperSearch search error: " << + Utils::String::replace(error, "\n", ""); mWindow->pushGui(new GuiMsgBox(mWindow, getHelpStyle(), Utils::String::toUpper(error), "RETRY", std::bind(&GuiScraperSearch::search, this, mLastSearch), "CANCEL", mCancelCallback)); diff --git a/es-app/src/scrapers/ScreenScraper.cpp b/es-app/src/scrapers/ScreenScraper.cpp index edaf4014b..be7666523 100644 --- a/es-app/src/scrapers/ScreenScraper.cpp +++ b/es-app/src/scrapers/ScreenScraper.cpp @@ -214,11 +214,8 @@ void ScreenScraperRequest::process(const std::unique_ptr& req, ss << "ScreenScraperRequest - Error parsing XML: " << parseResult.description(); std::string err = ss.str(); - setError("ScreenScraper error:\n" + err); LOG(LogError) << err; - - LOG(LogError) << "ScreenScraperRequest - Additional information:"; - LOG(LogError) << req->getContent(); + setError("ScreenScraper error: \n" + req->getContent()); return; }