aboutsummaryrefslogtreecommitdiff
path: root/bpkg/manifest.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2015-09-22 14:06:40 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2015-09-22 14:06:40 +0200
commit0db5f43f88a22a8ef9323ec5b1561be882662350 (patch)
treee415935b8e6f06b55bbaa5fd86de6a4586145857 /bpkg/manifest.cxx
parentfdf165a739b972234b5cada2e333699b0f4013bc (diff)
Minor improvements to repository_location
Diffstat (limited to 'bpkg/manifest.cxx')
-rw-r--r--bpkg/manifest.cxx24
1 files changed, 12 insertions, 12 deletions
diff --git a/bpkg/manifest.cxx b/bpkg/manifest.cxx
index 1034fe3..1ab9c72 100644
--- a/bpkg/manifest.cxx
+++ b/bpkg/manifest.cxx
@@ -1111,19 +1111,19 @@ namespace bpkg
if (n == "location")
{
- if (!v.empty ())
+ if (v.empty ())
+ bad_value ("empty location");
+
+ try
{
- try
- {
- // Call prerequisite repository location constructor, do not
- // ammend relative path.
- //
- location = repository_location (move (v), repository_location ());
- }
- catch (const invalid_argument& e)
- {
- bad_value (e.what ());
- }
+ // Call prerequisite repository location constructor, do not
+ // ammend relative path.
+ //
+ location = repository_location (move (v), repository_location ());
+ }
+ catch (const invalid_argument& e)
+ {
+ bad_value (e.what ());
}
}
else