aboutsummaryrefslogtreecommitdiff
path: root/mod/mod-build-log.cxx
diff options
context:
space:
mode:
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 ());