From b03eac0dfd5e38330e313c5c120ef8af3ab5c087 Mon Sep 17 00:00:00 2001 From: Malin E Date: Wed, 30 Mar 2022 14:07:47 +0200 Subject: [PATCH] Log location of error file when error occured --- .../launcher/src/profile/horizonsdialog.cpp | 20 ++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/apps/OpenSpace/ext/launcher/src/profile/horizonsdialog.cpp b/apps/OpenSpace/ext/launcher/src/profile/horizonsdialog.cpp index 54dc68ae35..ff7e5a41d7 100644 --- a/apps/OpenSpace/ext/launcher/src/profile/horizonsdialog.cpp +++ b/apps/OpenSpace/ext/launcher/src/profile/horizonsdialog.cpp @@ -491,6 +491,12 @@ bool HorizonsDialog::handleRequest() { ); std::filesystem::rename(oldFile, newFile); + + appendLog( + fmt::format("For more information, see the saved error file {}", + newFile), + LogLevel::Info + ); } return isValid; @@ -909,8 +915,7 @@ bool HorizonsDialog::handleResult(openspace::HorizonsFile::ResultCode& result) { _validTimeRange = readTimeRange(); if (_validTimeRange.first.empty() || _validTimeRange.second.empty()) { appendLog( - "Could not parse the valid time range from file. " - "For more information, see the saved horizons file", + "Could not parse the valid time range from file", HorizonsDialog::LogLevel::Error ); if (!_latestHorizonsError.empty()) { @@ -982,8 +987,7 @@ bool HorizonsDialog::handleResult(openspace::HorizonsFile::ResultCode& result) { "Multiple matching stations found" ); if (matchingstations.empty()) { - appendLog("Could not parse the matching stations. " - "For more information, see the saved horizons file", + appendLog("Could not parse the matching stations", HorizonsDialog::LogLevel::Error ); if (!_latestHorizonsError.empty()) { @@ -1017,8 +1021,7 @@ bool HorizonsDialog::handleResult(openspace::HorizonsFile::ResultCode& result) { std::vector matchingObservers = _horizonsFile.parseMatches("Name", "matches", ">MATCH NAME<"); if (matchingObservers.empty()) { - appendLog("Could not parse the matching observers. " - "For more information, see the saved horizons file", + appendLog("Could not parse the matching observers", HorizonsDialog::LogLevel::Error ); if (!_latestHorizonsError.empty()) { @@ -1075,8 +1078,7 @@ bool HorizonsDialog::handleResult(openspace::HorizonsFile::ResultCode& result) { std::vector matchingTargets = _horizonsFile.parseMatches("Name", "matches", ">MATCH NAME<"); if (matchingTargets.empty()) { - appendLog("Could not parse the matching targets. " - "For more information, see the saved horizons file", + appendLog("Could not parse the matching targets", HorizonsDialog::LogLevel::Error ); if (!_latestHorizonsError.empty()) { @@ -1101,7 +1103,7 @@ bool HorizonsDialog::handleResult(openspace::HorizonsFile::ResultCode& result) { case openspace::HorizonsFile::ResultCode::UnknownError: appendLog( - "Unknown error. For more information, see the saved horizons file", + "Unknown error", LogLevel::Error ); if (!_latestHorizonsError.empty()) {