Improved the ScreenScraper error reporting.

This commit is contained in:
Leon Styhre 2020-08-05 10:51:02 +02:00
parent 996af43299
commit 939f3389d5
2 changed files with 5 additions and 6 deletions

View file

@ -350,14 +350,16 @@ void GuiScraperSearch::onSearchDone(const std::vector<ScraperSearchResult>& resu
void GuiScraperSearch::onSearchError(const std::string& error) void GuiScraperSearch::onSearchError(const std::string& error)
{ {
if (mScrapeCount > 1) { 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), mWindow->pushGui(new GuiMsgBox(mWindow, getHelpStyle(), Utils::String::toUpper(error),
"RETRY", std::bind(&GuiScraperSearch::search, this, mLastSearch), "RETRY", std::bind(&GuiScraperSearch::search, this, mLastSearch),
"SKIP", mSkipCallback, "SKIP", mSkipCallback,
"CANCEL", mCancelCallback)); "CANCEL", mCancelCallback));
} }
else { 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), mWindow->pushGui(new GuiMsgBox(mWindow, getHelpStyle(), Utils::String::toUpper(error),
"RETRY", std::bind(&GuiScraperSearch::search, this, mLastSearch), "RETRY", std::bind(&GuiScraperSearch::search, this, mLastSearch),
"CANCEL", mCancelCallback)); "CANCEL", mCancelCallback));

View file

@ -214,11 +214,8 @@ void ScreenScraperRequest::process(const std::unique_ptr<HttpReq>& req,
ss << "ScreenScraperRequest - Error parsing XML: " << parseResult.description(); ss << "ScreenScraperRequest - Error parsing XML: " << parseResult.description();
std::string err = ss.str(); std::string err = ss.str();
setError("ScreenScraper error:\n" + err);
LOG(LogError) << err; LOG(LogError) << err;
setError("ScreenScraper error: \n" + req->getContent());
LOG(LogError) << "ScreenScraperRequest - Additional information:";
LOG(LogError) << req->getContent();
return; return;
} }