aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libbuild2/module.cxx10
1 files changed, 9 insertions, 1 deletions
diff --git a/libbuild2/module.cxx b/libbuild2/module.cxx
index c6c6c3d..45cbd30 100644
--- a/libbuild2/module.cxx
+++ b/libbuild2/module.cxx
@@ -132,7 +132,15 @@ namespace build2
// If this is one of the bundled modules, the project name is build2,
// otherwise -- libbuild2-<mod>.
//
- project_name proj (bundled ? "build2" : "libbuild2-" + mod);
+ project_name proj;
+ try
+ {
+ proj = project_name (bundled ? "build2" : "libbuild2-" + mod);
+ }
+ catch (const invalid_argument& e)
+ {
+ fail (loc) << "invalid build system module '" << mod << "': " << e;
+ }
// The target we are looking for is <prj>%libs{build2-<mod>}.
//