From ec1f115eaed9ec950cacab1b7ded6d35e99afb9d Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Mon, 28 Jan 2019 14:16:46 +0300 Subject: Fix package_manifest class not to throw logic_error on parsing/serializing --- libbpkg/manifest.cxx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libbpkg/manifest.cxx b/libbpkg/manifest.cxx index 1e38451..2f98b4c 100644 --- a/libbpkg/manifest.cxx +++ b/libbpkg/manifest.cxx @@ -3631,9 +3631,9 @@ namespace bpkg bool base (r.effective_role () == repository_role::base); if (r.location.empty () != base) - throw logic_error (r.location.empty () - ? "no location specified" - : "location not allowed"); + bad_value (r.location.empty () + ? "no location specified" + : "location not allowed"); if (r.trust && (base || r.location.type () != repository_type::pkg)) bad_value ("trust not allowed"); @@ -3684,7 +3684,7 @@ namespace bpkg bool b (effective_role () == repository_role::base); if (location.empty () != b) - throw logic_error ( + bad_value ( location.empty () ? "no location specified" : "location not allowed"); s.next ("", "1"); // Start of manifest. -- cgit v1.1