From 0ce6a95f5fca35888632551181e2c3756e38942c Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Fri, 9 Sep 2016 19:02:30 +0300 Subject: Fix crashing on subprojects that have no project variable set --- build2/file.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'build2/file.cxx') diff --git a/build2/file.cxx b/build2/file.cxx index 0040fd4..8239d1f 100644 --- a/build2/file.cxx +++ b/build2/file.cxx @@ -341,7 +341,7 @@ namespace build2 auto p (extract_variable (f, "src_root")); if (!p.second) - error << "variable 'src_root' expected as first line in " << f; + fail << "variable 'src_root' expected as first line in " << f; src_root_v = move (p.first); src_root = &cast (src_root_v); @@ -356,7 +356,7 @@ namespace build2 auto p (extract_variable (f, "project")); if (!p.second) - error << "variable 'project' expected as first line in " << f; + fail << "variable 'project' expected as first line in " << f; name = cast (move (p.first)); } -- cgit v1.1