aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/variable.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2024-01-10 11:02:33 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2024-01-10 11:02:33 +0200
commit293aed4d3b9bafd0ffb30de095ab955615434e67 (patch)
tree82db4add9fdc3e959647bd667b0b9cf32a623eef /libbuild2/variable.cxx
parent32ca0e7d4b56bc523ee3f3c8d6a0c1631044baa7 (diff)
Fix abs_dir_path conversion diagnostics
Diffstat (limited to 'libbuild2/variable.cxx')
-rw-r--r--libbuild2/variable.cxx9
1 files changed, 8 insertions, 1 deletions
diff --git a/libbuild2/variable.cxx b/libbuild2/variable.cxx
index 8c52e22..392c9bb 100644
--- a/libbuild2/variable.cxx
+++ b/libbuild2/variable.cxx
@@ -877,7 +877,14 @@ namespace build2
return abs_dir_path (move (d));
}
- catch (const invalid_path&) {} // Fall through.
+ catch (invalid_path& e)
+ {
+ // We moved from name so reconstruct the path. Let's always make it
+ // simple since we may not be able to construct dir_path. Should be
+ // good enough for diagnostics.
+ //
+ n.value = move (e.path);
+ }
}
throw_invalid_argument (n, r, "abs_dir_path");