aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMelody Horn <melody@boringcactus.com>2021-04-05 12:00:13 -0600
committerMelody Horn <melody@boringcactus.com>2021-04-05 12:00:13 -0600
commit52c5c7f8376c42f8ed4702b60754332864daabf3 (patch)
tree42f5b7ab8ae240f2eab95f6683985e92b8af214a /src
parentc5b0ecbfbb73113e99f8baa29891fbe0ba598b68 (diff)
downloadmakers-52c5c7f8376c42f8ed4702b60754332864daabf3.tar.gz
makers-52c5c7f8376c42f8ed4702b60754332864daabf3.zip
give context for errors when disambiguating a line
Diffstat (limited to 'src')
-rw-r--r--src/makefile/input.rs6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/makefile/input.rs b/src/makefile/input.rs
index 316968f..d6cffdf 100644
--- a/src/makefile/input.rs
+++ b/src/makefile/input.rs
@@ -240,7 +240,11 @@ impl<'a, 'parent, R: BufRead> MakefileReader<'a, 'parent, R> {
// before we actually test it, see if it's only visible after expanding macros
let (line_tokens, line_type) = if let LineType::Unknown = line_type {
- let line_tokens = TokenString::text(self.expand_macros(&line_tokens)?.trim());
+ let line_tokens = TokenString::text(
+ self.expand_macros(&line_tokens)
+ .wrap_err_with(|| format!("while parsing line {}", line_number))?
+ .trim(),
+ );
// and let's eval whatever bullshit needs evaling
#[cfg(feature = "full")]
{