From 6ce19c537bd9de8d3c9821841bc5ed680b762742 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Thu, 24 May 2018 00:25:45 +0300 Subject: Adapt to inventing package_name type --- mod/mod-build-log.cxx | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'mod/mod-build-log.cxx') 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 ()); -- cgit v1.1