aboutsummaryrefslogtreecommitdiff
path: root/mod/mod-build-log.cxx
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2018-05-24 00:25:45 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2018-05-24 17:11:47 +0300
commit6ce19c537bd9de8d3c9821841bc5ed680b762742 (patch)
tree2a487b1d5ec75b05e3001a461f149e14e5a859a8 /mod/mod-build-log.cxx
parent3363e1239973a66722f681999771964e39a98332 (diff)
Adapt to inventing package_name type
Diffstat (limited to 'mod/mod-build-log.cxx')
-rw-r--r--mod/mod-build-log.cxx12
1 files changed, 9 insertions, 3 deletions
diff --git a/mod/mod-build-log.cxx b/mod/mod-build-log.cxx
index 3fc24cc..c1eec4c 100644
--- a/mod/mod-build-log.cxx
+++ b/mod/mod-build-log.cxx
@@ -83,10 +83,16 @@ handle (request& rq, response& rs)
auto i (lpath.begin ());
assert (i != lpath.end ());
- string name (*i++);
+ package_name name;
- if (name.empty ())
- throw invalid_argument ("empty package name");
+ try
+ {
+ name = package_name (*i++);
+ }
+ catch (const invalid_argument& e)
+ {
+ throw invalid_argument (string ("invalid package name: ") + e.what ());
+ }
assert (i != lpath.end ());