fix: Add tool exception for logging purpose

This commit is contained in:
Petr Mironychev
2025-10-21 00:51:42 +02:00
parent c95b20d6d4
commit 7e878cdbf8
9 changed files with 165 additions and 33 deletions

View File

@ -18,6 +18,7 @@
*/
#include "ListProjectFilesTool.hpp"
#include "ToolExceptions.hpp"
#include <logger/Logger.hpp>
#include <projectexplorer/project.h>
@ -86,7 +87,7 @@ QFuture<QString> ListProjectFilesTool::executeAsync(const QJsonObject &input)
QList<ProjectExplorer::Project *> projects = ProjectExplorer::ProjectManager::projects();
if (projects.isEmpty()) {
QString error = "Error: No projects found";
throw std::runtime_error(error.toStdString());
throw ToolRuntimeError(error);
}
QString result;