From cde3ea58802c700ed8fd3b11e46eb973a7018a12 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Wed, 19 Jun 2019 08:38:56 +0200 Subject: Improve diagnostics --- build2/cc/common.cxx | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'build2/cc/common.cxx') diff --git a/build2/cc/common.cxx b/build2/cc/common.cxx index 1bfb354..b4b0a6d 100644 --- a/build2/cc/common.cxx +++ b/build2/cc/common.cxx @@ -971,7 +971,7 @@ namespace build2 // Extract user-supplied search paths (i.e., -L, /LIBPATH). // - auto extract = [&r, this] (const value& val, const variable& what) + auto extract = [&bs, &r, this] (const value& val, const variable& var) { const auto& v (cast (val)); @@ -1012,8 +1012,10 @@ namespace build2 } catch (const invalid_path& e) { - fail << "invalid path '" << e.path << "' in option '" << o - << "' in variable " << what; + fail << "invalid directory '" << e.path << "'" + << " in option '" << o << "'" + << " in variable " << var + << " for scope " << bs; } // Ignore relative paths. Or maybe we should warn? -- cgit v1.1