aboutsummaryrefslogtreecommitdiff
path: root/libbpkg/manifest.cxx
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2019-01-28 14:16:46 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2019-01-28 14:16:46 +0300
commitec1f115eaed9ec950cacab1b7ded6d35e99afb9d (patch)
treec2b346cbf5ee864635ba255a35c72734ef54225f /libbpkg/manifest.cxx
parent621ce5fa18151a0cf25b4be6e35c8341f4d0fa12 (diff)
Fix package_manifest class not to throw logic_error on parsing/serializing
Diffstat (limited to 'libbpkg/manifest.cxx')
-rw-r--r--libbpkg/manifest.cxx8
1 files 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.