Files
MuditaOS/module-apps/application-settings/presenter/system/SARInfoWindowPresenter.cpp
Lefucjusz 773f2c7eb1 [BH-2069] Update license URL in headers
Update outdated license file URL in
license headers across all project.
2024-09-18 11:53:01 +02:00

22 lines
684 B
C++

// Copyright (c) 2017-2024, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/blob/master/LICENSE.md
#include "SARInfoWindowPresenter.hpp"
#include <log/log.hpp>
SARInfoWindowPresenter::SARInfoWindowPresenter(std::unique_ptr<AbstractSARInfoRepository> &&sarInfoRepository)
: sarInfoRepository{std::move(sarInfoRepository)}
{}
std::string SARInfoWindowPresenter::getSarInfo()
{
try {
const auto sarInfoText = sarInfoRepository->getSarInfoText();
return sarInfoText;
}
catch (const std::runtime_error &e) {
LOG_ERROR("Failed to get SAR info text! Error: %s", e.what());
return "";
}
}