From bb3d45c4eab2438a06f014f79ba9d0a1150cd492 Mon Sep 17 00:00:00 2001 From: Simon Quigley Date: Wed, 29 Jan 2025 14:53:41 -0600 Subject: [PATCH] In process_binaries_thread_, exit earlier if the item is not found in the PPA --- cpp/web_server.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/cpp/web_server.cpp b/cpp/web_server.cpp index c626ba2..c2727e8 100644 --- a/cpp/web_server.cpp +++ b/cpp/web_server.cpp @@ -257,6 +257,8 @@ bool WebServer::start_server(quint16 port) { break; } + if (!found_in_ppa) throw std::runtime_error("Not found in the PPA."); + bool all_builds_passed = true; for (auto build : target_spph.getBuilds()) { if (build.buildstate != "Successfully built") all_builds_passed = false; @@ -265,11 +267,7 @@ bool WebServer::start_server(quint16 port) { build.arch_tag, build.buildstate)); } - if (!found_in_ppa) { - throw std::runtime_error("Not found in the PPA."); - } else if (!all_builds_passed) { - throw std::runtime_error("Build(s) pending or failed, job is not successful."); - } + if (!all_builds_passed) throw std::runtime_error("Build(s) pending or failed, job is not successful."); }, pkgconf );