From 2dd97a55f8827b857daa717d9e3542d732ca4471 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Wed, 8 Mar 2023 14:59:50 +0100 Subject: [PATCH] fixes --- bsp_q7s/core/CoreController.cpp | 4 ++-- mission/memory/NvmParameterBase.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/bsp_q7s/core/CoreController.cpp b/bsp_q7s/core/CoreController.cpp index 8823bf4e..f51f6bf9 100644 --- a/bsp_q7s/core/CoreController.cpp +++ b/bsp_q7s/core/CoreController.cpp @@ -1205,7 +1205,8 @@ void CoreController::performMountedSdCardOperations() { if (not std::filesystem::exists(path.str()), e) { bool created = std::filesystem::create_directory(path.str(), e); if (not created) { - sif::error << "Could not create CONF folder at " << path << ": " << e << std::endl; + sif::error << "Could not create CONF folder at " << path.str() << ": " << e.message() + << std::endl; return; } } @@ -1897,7 +1898,6 @@ ReturnValue_t CoreController::executeSwUpdate(SwUpdateSources sourceDir, const u utility::handleSystemError(result, "CoreController::executeAction: SW Update Decompression"); } path strippedImagePath = prefixPath / path(config::STRIPPED_OBSW_BINARY_FILE_NAME); - std::error_code e; if (!exists(strippedImagePath, e)) { // TODO: Custom returnvalue? return returnvalue::FAILED; diff --git a/mission/memory/NvmParameterBase.cpp b/mission/memory/NvmParameterBase.cpp index 9856acf8..9b89440f 100644 --- a/mission/memory/NvmParameterBase.cpp +++ b/mission/memory/NvmParameterBase.cpp @@ -16,8 +16,8 @@ ReturnValue_t NVMParameterBase::readJsonFile() { std::ifstream i(fullName); try { i >> json; - } catch (nlohmann::json::exception& e) { - sif::warning << "Reading JSON file failed with error " << e.what() << std::endl; + } catch (nlohmann::json::exception& nlohmannE) { + sif::warning << "Reading JSON file failed with error " << nlohmannE.what() << std::endl; return returnvalue::FAILED; } return returnvalue::OK;